-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! changed from apolloclient to graphql-request
- Loading branch information
1 parent
df486cb
commit 4d23f35
Showing
2 changed files
with
3,271 additions
and
5,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.