-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move check for graphql string in source files to language plugin (#2811)
Summary: This moves the check for the string `graphql` in source files to the JS language plugin, away from `RelaySourceModuleParser`. This has two reasons: 1. Language plugins might not require/use the string 'graphql'. I have that case when emitting ReasonML types - Writing GraphQL there looks like `[%relay.mutation ...]` and `[%relay.query ...]`, so `graphql` is not naturally inside any of the source files I want the compiler to pick up. 2. The requirement was quite "hidden" and it took me a few hours to understand why my files weren't picked up even though they seemed to satisfy all requirements of the compiler + configuration. So, also reducing confusion. If this lands I'll PR the TypeScript language plugin to add the same type of check into that as well. Pull Request resolved: #2811 Reviewed By: jstejada Differential Revision: D19856119 Pulled By: alunyov fbshipit-source-id: 864c75020db6993b0a3702c38a8ab22b7933073a
- Loading branch information
Showing
3 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters