diff --git a/examples/configuration-fetch-custom-function.ts b/examples/configuration-fetch-custom-function.ts index 8e6e72f03..f18a50ef0 100644 --- a/examples/configuration-fetch-custom-function.ts +++ b/examples/configuration-fetch-custom-function.ts @@ -22,9 +22,9 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await graphQLClient.rawRequest(query) +const data = await graphQLClient.rawRequest(query) console.log(data) diff --git a/examples/configuration-fetch-options.ts b/examples/configuration-fetch-options.ts index 2cdb8ed9d..ac69bf6ce 100644 --- a/examples/configuration-fetch-options.ts +++ b/examples/configuration-fetch-options.ts @@ -18,9 +18,9 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await graphQLClient.request(query) +const data = await graphQLClient.request(query) console.log(data) diff --git a/examples/graphql-batching-requests.ts b/examples/graphql-batching-requests.ts index fd083ba0b..06bbdc54a 100644 --- a/examples/graphql-batching-requests.ts +++ b/examples/graphql-batching-requests.ts @@ -18,7 +18,7 @@ const variables1 = { id: `C105`, } -interface TData1 { +interface Data1 { data: { capsule: { id: string; landings: number } } } @@ -30,7 +30,7 @@ const query2 = gql` } ` -interface TData2 { +interface Data2 { data: { rockets: { active: boolean }[] } } @@ -48,11 +48,11 @@ const variables3 = { id: `B1015`, } -interface TData3 { +interface Data3 { data: { core: { id: string; block: number; original_launch: string } } } -const data = await batchRequests<[TData1, TData2, TData3]>(endpoint, [ +const data = await batchRequests<[Data1, Data2, Data3]>(endpoint, [ { document: query1, variables: variables1 }, { document: query2 }, { document: query3, variables: variables3 }, diff --git a/examples/graphql-document-variables.ts b/examples/graphql-document-variables.ts index 261ac9606..64c163376 100644 --- a/examples/graphql-document-variables.ts +++ b/examples/graphql-document-variables.ts @@ -17,9 +17,9 @@ const variables = { title: `Inception`, } -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await request(endpoint, query, variables) +const data = await request(endpoint, query, variables) console.log(data) diff --git a/examples/other-error-handling.ts b/examples/other-error-handling.ts index 0d0e8e0fe..52bbf9b37 100644 --- a/examples/other-error-handling.ts +++ b/examples/other-error-handling.ts @@ -13,12 +13,12 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } try { - const data = await request(endpoint, query) + const data = await request(endpoint, query) console.log(data) } catch (error) { console.error(error) diff --git a/examples/request-authentication-via-http-header.ts b/examples/request-authentication-via-http-header.ts index 3ac64ec4d..921af8866 100644 --- a/examples/request-authentication-via-http-header.ts +++ b/examples/request-authentication-via-http-header.ts @@ -19,9 +19,9 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await graphQLClient.request(query) +const data = await graphQLClient.request(query) console.log(data) diff --git a/examples/request-cookie-support-for-node.ts b/examples/request-cookie-support-for-node.ts index d1d1d0dc7..ffea693bf 100644 --- a/examples/request-cookie-support-for-node.ts +++ b/examples/request-cookie-support-for-node.ts @@ -19,9 +19,9 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await client.rawRequest(query) +const data = await client.rawRequest(query) console.log(data) diff --git a/examples/request-handle-raw-response.ts b/examples/request-handle-raw-response.ts index 77daf4689..cb1844122 100644 --- a/examples/request-handle-raw-response.ts +++ b/examples/request-handle-raw-response.ts @@ -18,9 +18,9 @@ const query = gql` } ` -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const { data, errors, extensions, headers, status } = await rawRequest(endpoint, query) +const { data, errors, extensions, headers, status } = await rawRequest(endpoint, query) console.log({ data, errors, extensions, headers, status }) diff --git a/examples/request-headers-static-per-request.ts b/examples/request-headers-static-per-request.ts index 6e811fb9f..63dcf7658 100644 --- a/examples/request-headers-static-per-request.ts +++ b/examples/request-headers-static-per-request.ts @@ -28,9 +28,9 @@ const requestHeaders = { 'x-custom': `foo`, } -interface TData { +interface Data { Movie: { releaseDate: string; actors: Array<{ name: string }> } } -const data = await client.request(query, {}, requestHeaders) +const data = await client.request(query, {}, requestHeaders) console.log(data)