From 317e34b4140ad1db1300010220be31377f62ecaf Mon Sep 17 00:00:00 2001 From: Yuki Takemoto Date: Sun, 7 Apr 2019 17:50:08 +0900 Subject: [PATCH 1/2] fix(docs): Fix broken link --- docs/docs/page-query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/page-query.md b/docs/docs/page-query.md index de014b4ff1cf4..a0f6d859ea8bd 100644 --- a/docs/docs/page-query.md +++ b/docs/docs/page-query.md @@ -135,6 +135,6 @@ During the Gatsby build process, GraphQL queries are pulled out of the original ### The longer answer The longer answer is a little more involved: Gatsby borrows a technique from -[Relay](https://facebook.github.io/relay/) that converts your source code into an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) during the build step. [`file-parser.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/internal-plugins/query-runner/file-parser.js) and [`query-compiler.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/internal-plugins/query-runner/query-compiler.js) pick out your `graphql`-tagged templates and effectively remove them from the original source code. +[Relay](https://facebook.github.io/relay/) that converts your source code into an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) during the build step. [`file-parser.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/file-parser.js) and [`query-compiler.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/query-compiler.js) pick out your `graphql`-tagged templates and effectively remove them from the original source code. This means that the `graphql` tag isn’t executed the way that you might expect. For example, you cannot use [expression interpolation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Expression_interpolation) with Gatsby's `graphql` tag. From 654f2a65ab67b34bb1037462b200c70d2bc2fcc7 Mon Sep 17 00:00:00 2001 From: Dustin Schau Date: Tue, 9 Apr 2019 02:43:29 +0900 Subject: [PATCH 2/2] Update docs/docs/page-query.md Co-Authored-By: mottox2 --- docs/docs/page-query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/page-query.md b/docs/docs/page-query.md index a0f6d859ea8bd..282cdcc1f8f01 100644 --- a/docs/docs/page-query.md +++ b/docs/docs/page-query.md @@ -135,6 +135,6 @@ During the Gatsby build process, GraphQL queries are pulled out of the original ### The longer answer The longer answer is a little more involved: Gatsby borrows a technique from -[Relay](https://facebook.github.io/relay/) that converts your source code into an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) during the build step. [`file-parser.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/file-parser.js) and [`query-compiler.js`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/query/query-compiler.js) pick out your `graphql`-tagged templates and effectively remove them from the original source code. +[Relay](https://facebook.github.io/relay/) that converts your source code into an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) during the build step. [`file-parser.js`](https://github.com/gatsbyjs/gatsby/blob/5078f03027c868554111f48fbd5d685c403a9fdd/packages/gatsby/src/query/file-parser.js) and [`query-compiler.js`](https://github.com/gatsbyjs/gatsby/blob/5078f03027c868554111f48fbd5d685c403a9fdd/packages/gatsby/src/query/query-compiler.js) pick out your `graphql`-tagged templates and effectively remove them from the original source code. This means that the `graphql` tag isn’t executed the way that you might expect. For example, you cannot use [expression interpolation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Expression_interpolation) with Gatsby's `graphql` tag.