From 309f6f9a17b4b8cd274d34257aefde701d9c12b8 Mon Sep 17 00:00:00 2001 From: Jonas Gierer Date: Tue, 19 Feb 2019 12:42:46 +0100 Subject: [PATCH] Add duplicate query problem --- text/0000-graphql-api-server.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/text/0000-graphql-api-server.md b/text/0000-graphql-api-server.md index c02c469..9e48e30 100644 --- a/text/0000-graphql-api-server.md +++ b/text/0000-graphql-api-server.md @@ -113,6 +113,10 @@ This function should be exported as a named export by the `gatsby` package. - The same limitations of the development GraphQL schema also apply to this, namely that it doesn't support fragments provided by plugins yet (popular example: `gatsby-image`'s numerous fragments). +- Queries that are the same at build time and run time must be duplicated + ([example](https://github.com/jgierer12/gatsby-api-proposal-demo/blob/master/src/pages/index.js#L10-L66)). + This could for example be solved by being able to pass strings to Gatsby's + `graphql` function, or importing `.graphql` files. # Alternatives