Skip to content

Commit

Permalink
docs: Fix minor typing issues with twoslash
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 14, 2024
1 parent 88ec0a6 commit fc0f551
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions website/guides/fragment-colocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -197,7 +197,7 @@ export const pokemonTypesFragment = graphql(`
export const PokemonTypes = (props: {
data: FragmentOf<typeof pokemonTypesFragment>
}) => null;
// @filename: ./src/Pokemon.tsx
// @filename: Pokemon.tsx
// ---cut---
import { FragmentOf, graphql } from 'gql.tada';
import { pokemonTypesFragment, PokemonTypes } from './PokemonTypes';
Expand Down Expand Up @@ -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';

Expand All @@ -260,7 +260,7 @@ export const pokemonTypesFragment = graphql(`
export const PokemonTypes = (props: {
data: FragmentOf<typeof pokemonTypesFragment>
}) => null;
// @filename: ./src/Pokemon.tsx
// @filename: Pokemon.tsx
import { FragmentOf, graphql } from 'gql.tada';
import { pokemonTypesFragment, PokemonTypes } from './PokemonTypes';

Expand Down
2 changes: 1 addition & 1 deletion website/guides/typed-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit fc0f551

Please sign in to comment.