Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gql file extension #4691

Closed
wants to merge 1 commit into from
Closed

Conversation

SaraVieira
Copy link

👋

I was testing the PR #3909 and noticed it only accepts .graphql files and since it's a very common practice to use .gql files for shorter typing I added support for those by changing the test for graphql files to the one here: https://github.com/apollographql/graphql-tag#webpack-preprocessing-with-graphql-tagloader

Also added a test for the gql extension and ran prettier.

Let me know any problems or if it's not something you don't plan to support

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon
Copy link
Contributor

gaearon commented Jun 27, 2018

It was intentional at the time. It's odd to support two extensions for the same thing. Is it really that necessary? Why is it valuable?

@SaraVieira
Copy link
Author

SaraVieira commented Jun 27, 2018

It was no huge value I think it's something that started getting adopted over time because people preferred to just write gql. It was the first one I tried when downloading v2 of react scripts, it's also on all the introductions and examples as another way to do it.

Examples:
https://www.apollographql.com/docs/react/recipes/webpack.html
https://github.com/apollographql/graphql-tag#webpack-preprocessing-with-graphql-tagloader

I think it mostly came from the gql package and became an unofficial thing people started doing

If not merged maybe add some note on the Readme.md when it has this part that only .graphql files are supported 👌

@Timer
Copy link
Contributor

Timer commented Sep 26, 2018

GQL was removed in favor of Macros, thanks!

@Timer Timer closed this Sep 26, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants