Uh oh!
There was an error while loading. Please reload this page.
Document .graphql and .gql file loading with graphql.macro - #5481
Conversation
petetnt
commented
Oct 23, 2018
This should probably target the docs too https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/ |
Signed-off-by: petetnt <pete.a.nykanen@gmail.com>
67c3941 to
36353beComparepetetnt
commented
Oct 23, 2018
Aaaand now it targets the docusaurus docs 🦎 |
| sidebar_label: Loading .graphql Files | ||
| --- | ||
| You can load `.gql` and `.graphql` files by using [`babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros) included with Create React App. |
There was a problem hiding this comment.
Let's skip the part talking about macros and just combine these two sentences.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
petetnt
commented
Oct 24, 2018
@Timer addressed comments, thanks! |
Timer
commented
Oct 24, 2018
Shouldn't this come right after Relay docs? |
Adding loading other types of assets (images, svgs, styles...) are on that section and AFAIK the Anyway is fine with me, you can take the pick 😄 |
| Alternatively you may use `yarn`: | ||
| ```sh | ||
| yarn add graphql-tag.macro |
There was a problem hiding this comment.
I think you meant graphql.macro rather than graphql-tag.macro here
There was a problem hiding this comment.
Thanks a ton @AndresRodH ! You are totally right, graphql.macro offers both the gql and the loader while graphql-tag only has the tag.
There was a problem hiding this comment.
You missed this one! 😆yarn add graphql.macro
There was a problem hiding this comment.
Hahaa 🤦♂️ maybe it's fixed now. I blame the GitHub editor and doing changes on the go 😂
petetnt
commented
Oct 26, 2018
Thanks @AndresRodH for reviewing! |
audiolion
commented
Oct 27, 2018
Just going to throw this out there, I made a PR which adds support for this, but, it looks like I am also somewhat concerned because it does not look like the repository is being actively maintained, I made a fork with absolute path and node modules path support at @kimmel/graphql.macro to use for now with the hope that the maintainer will become active. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: petetnt <pete.a.nykanen@gmail.com>
Co-Authored-By: petetnt <pete.a.nykanen@gmail.com>
petetnt
commented
Feb 14, 2019
Good catch @donovantc, fixed! |
petetnt
commented
Feb 14, 2019
It seems that @audiolion's comment has been addressed in |
iansu
commented
Feb 16, 2019
The deploy preview seems to be broken. Can you try rebasing with master to see if that fixes it? |
This PR follows up #3909 and #5076 by adding documentation for the
.graphqlloading features throughbabel-plugin-macros.Signed-off-by: petetnt pete.a.nykanen@gmail.com