Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
throw error when fragment is not loaded
update docs to latest apollo local state and gatsby
- Loading branch information
1 parent
d655355
commit 72ddabc
Showing
4 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
docs/integrations/apollo-link-state.md → docs/integrations/apollo-local-state.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: gatsby | ||
title: GatsbyJS | ||
--- | ||
|
||
If you are building apps using [GatsbyJS](https://www.gatsbyjs.org/), you can intergrate GraphQL Code Generator and use it to generate types. | ||
|
||
The codegen knows automatically to look for the import of the `graphql` tag for `gatsby` package. | ||
|
||
Using the following config file, it should cover everything specific to Gastby: | ||
|
||
```yml | ||
schema: http://localhost:8000/___graphql | ||
documents: | ||
- ./src/**/*.{ts,tsx} | ||
- ./node_modules/gatsby-*/**/*.js | ||
generates: | ||
./src/graphqlTypes.ts: | ||
plugins: | ||
- typescript | ||
- typescript-operations | ||
``` | ||
|
||
Now, the codegen should be able to load your GraphQL operations from your source code, and also load all the internal fragments from `node_modules`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters