Skip to content

Commit

Permalink
chore(docs): do not use t-prefix type names
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Apr 16, 2023
1 parent 81c8bb2 commit b7025c8
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions examples/configuration-fetch-custom-function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const query = gql`
}
`

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

const data = await graphQLClient.rawRequest<TData>(query)
const data = await graphQLClient.rawRequest<Data>(query)
console.log(data)
4 changes: 2 additions & 2 deletions examples/configuration-fetch-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const query = gql`
}
`

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

const data = await graphQLClient.request<TData>(query)
const data = await graphQLClient.request<Data>(query)
console.log(data)
8 changes: 4 additions & 4 deletions examples/graphql-batching-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const variables1 = {
id: `C105`,
}

interface TData1 {
interface Data1 {
data: { capsule: { id: string; landings: number } }
}

Expand All @@ -30,7 +30,7 @@ const query2 = gql`
}
`

interface TData2 {
interface Data2 {
data: { rockets: { active: boolean }[] }
}

Expand All @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions examples/graphql-document-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const variables = {
title: `Inception`,
}

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

const data = await request<TData>(endpoint, query, variables)
const data = await request<Data>(endpoint, query, variables)
console.log(data)
4 changes: 2 additions & 2 deletions examples/other-error-handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const query = gql`
}
`

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

try {
const data = await request<TData>(endpoint, query)
const data = await request<Data>(endpoint, query)
console.log(data)
} catch (error) {
console.error(error)
Expand Down
4 changes: 2 additions & 2 deletions examples/request-authentication-via-http-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const query = gql`
}
`

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

const data = await graphQLClient.request<TData>(query)
const data = await graphQLClient.request<Data>(query)
console.log(data)
4 changes: 2 additions & 2 deletions examples/request-cookie-support-for-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const query = gql`
}
`

interface TData {
interface Data {
Movie: { releaseDate: string; actors: Array<{ name: string }> }
}

const data = await client.rawRequest<TData>(query)
const data = await client.rawRequest<Data>(query)
console.log(data)
4 changes: 2 additions & 2 deletions examples/request-handle-raw-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TData>(endpoint, query)
const { data, errors, extensions, headers, status } = await rawRequest<Data>(endpoint, query)
console.log({ data, errors, extensions, headers, status })
4 changes: 2 additions & 2 deletions examples/request-headers-static-per-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TData>(query, {}, requestHeaders)
const data = await client.request<Data>(query, {}, requestHeaders)
console.log(data)

0 comments on commit b7025c8

Please sign in to comment.