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

Revert "Add loader for .graphql files (#3909)" #5076

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 24, 2018

This reverts adding explicit support for .graphql files following #4893.

This behavior is easily accomplished via a babel macro, and it more explicit than getting an arbitrary-version AST object from a text file.

@Timer Timer added this to the 2.0.0 milestone Sep 24, 2018
Copy link
Contributor

@petetnt petetnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Timer Timer merged commit 03a7091 into facebook:next Sep 24, 2018
@Timer Timer deleted the revert-gql-support branch September 24, 2018 16:49
@petetnt
Copy link
Contributor

petetnt commented Sep 24, 2018

For brevity, the macro is https://github.com/evenchange4/graphql.macro

Usage:

import { loader } from 'graphql.macro';
const A = loader('./assets/graphql.graphql');

Thanks @Timer!

@glennreyes
Copy link
Contributor

Changes in a .graphql file doesn't reload the app automatically. Any ideas/chances to get live-reloading on graphql files supported?

@iansu
Copy link
Contributor

iansu commented Nov 6, 2018

@glennreyes Please file a new issue.

danilobuerger added a commit to danilobuerger/graphql-tag that referenced this pull request Jan 15, 2019
Initial loader support in CRA2 was reverted here: facebook/create-react-app#5076
Using the macro https://github.com/evenchange4/graphql.macro the same can be achieved.
@lock lock bot locked and limited conversation to collaborators Jan 18, 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.

5 participants