From fc0f551bbf9e3395e045ff71cf26db99a1905fe5 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Thu, 14 Mar 2024 19:13:44 +0000 Subject: [PATCH] docs: Fix minor typing issues with twoslash --- website/guides/fragment-colocation.md | 8 ++++---- website/guides/typed-documents.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/guides/fragment-colocation.md b/website/guides/fragment-colocation.md index 64107ffe..3abe7623 100644 --- a/website/guides/fragment-colocation.md +++ b/website/guides/fragment-colocation.md @@ -184,7 +184,7 @@ component we’ve already defined above: ::: code-group ```tsx twoslash [Pokemon.tsx] -// @filename: ./src/PokemonTypes.tsx +// @filename: PokemonTypes.tsx import './graphql/graphql-env.d.ts'; import { FragmentOf, graphql } from 'gql.tada'; @@ -197,7 +197,7 @@ export const pokemonTypesFragment = graphql(` export const PokemonTypes = (props: { data: FragmentOf }) => null; -// @filename: ./src/Pokemon.tsx +// @filename: Pokemon.tsx // ---cut--- import { FragmentOf, graphql } from 'gql.tada'; import { pokemonTypesFragment, PokemonTypes } from './PokemonTypes'; @@ -247,7 +247,7 @@ depend on data that only the `PokemonTypes`’s fragment defines. ::: code-group ```tsx twoslash [Pokemon.tsx] -// @filename: ./src/PokemonTypes.tsx +// @filename: PokemonTypes.tsx import './graphql/graphql-env.d.ts'; import { FragmentOf, graphql } from 'gql.tada'; @@ -260,7 +260,7 @@ export const pokemonTypesFragment = graphql(` export const PokemonTypes = (props: { data: FragmentOf }) => null; -// @filename: ./src/Pokemon.tsx +// @filename: Pokemon.tsx import { FragmentOf, graphql } from 'gql.tada'; import { pokemonTypesFragment, PokemonTypes } from './PokemonTypes'; diff --git a/website/guides/typed-documents.md b/website/guides/typed-documents.md index d15eed00..60d9cf53 100644 --- a/website/guides/typed-documents.md +++ b/website/guides/typed-documents.md @@ -292,7 +292,7 @@ In `gql.tada` however, the idea is that we get from writing a query to having a tool or having files be generated for each query. ```ts twoslash -// @filename: graphq-env.d.ts +// @filename: graphql-env.d.ts export type introspection = { "__schema": { "queryType": {