Skip to content

Commit

Permalink
fixup! changed from apolloclient to graphql-request
Browse files Browse the repository at this point in the history
  • Loading branch information
NabbeunNabi committed Mar 11, 2024
1 parent df486cb commit 4d23f35
Show file tree
Hide file tree
Showing 2 changed files with 3,271 additions and 5,873 deletions.
23 changes: 11 additions & 12 deletions utils/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
import { GraphQLClient } from 'graphql-request'
import { GraphQLClient } from "graphql-request";

export let gqlClient: GraphQLClient
export let gqlClient: GraphQLClient;

export const initializeGqlClient = () => {
if (gqlClient) {
return gqlClient
return gqlClient;
}

const endpoint = 'https://findadoc-api-9brq4.ondigitalocean.app/api'
const client = new GraphQLClient(endpoint)
gqlClient = client
}

const endpoint = "https://api.findadoc.jp";
const client = new GraphQLClient(endpoint);
gqlClient = client;
};

export interface gqlMutation<T> extends gqlRequest {
variables: {
input: T
}
input: T;
};
}

export interface gqlRequest {
query: string
variables: unknown
query: string;
variables: unknown;
}
Loading

0 comments on commit 4d23f35

Please sign in to comment.