Skip to content

Commit

Permalink
examples: Update tsconfig.json in example
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Jan 16, 2024
1 parent 1834b34 commit 71895c3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
29 changes: 28 additions & 1 deletion examples/example-pokemon-api/schema/introspection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
export const introspection = {
/** An IntrospectionQuery representation of your schema.
*
* @remarks
* This is an introspection of your schema saved as a file by GraphQLSP.
* You may import it to create a `graphql()` tag function with `gql.tada`
* by importing it and passing it to `initGraphQLTada<>()`.
*
* @example
* ```
* import { initGraphQLTada } from 'gql.tada';
* import type { introspection } from './introspection';
*
* export const graphql = initGraphQLTada<{
* introspection: typeof introspection;
* scalars: {
* DateTime: string;
* Json: any;
* };
* }>();
* ```
*/
const introspection = {
__schema: {
queryType: {
name: 'Query',
Expand Down Expand Up @@ -412,7 +433,13 @@ export const introspection = {
kind: 'SCALAR',
name: 'Boolean',
},
{
kind: 'SCALAR',
name: 'Any',
},
],
directives: [],
},
} as const;

export { introspection };
5 changes: 1 addition & 4 deletions examples/example-pokemon-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
{
"name": "@0no-co/graphqlsp",
"schema": "./schema/schema.graphql",
"disableTypegen": true,
"shouldCheckForColocatedFragments": true,
"template": "graphql",
"templateIsCallExpression": true
"tadaOutputLocation": "./schema/introspection.ts"
}
],
"noEmit": true,
Expand Down

0 comments on commit 71895c3

Please sign in to comment.