-
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.
Evaluate custom scalars first (#3671)
Summary: I have a custom scalar type on a private project that replaces the graphal `ID` type with a Flow `newtype`. The JS relay compiler supported the ability to replace built-ins, but the new Rust compiler seems to lack this ability. With this change, custom scalars are evaluated first, then built-ins, then `any` (or panic). AFAIK this matches the old compiler's behavior. My `cargo fmt` is not working right now for some reason, so I present this patch unformatted. If GitHub Actions doesn't complain, I assume Meta-internal formatters will catch and fix this if necessary. Pull Request resolved: #3671 Test Plan: `cargo test` passes `cargo run --bin relay -- ../../../myproject/relay.config.json` now replaces `ID` types with `GraphQLID` instead of `string` as it does in the rc0 version Reviewed By: alunyov Differential Revision: D32859584 Pulled By: bigfootjon fbshipit-source-id: 1a1d4b38d14359ecfdbe8f2e2f73d2fc24f519f5
- Loading branch information
1 parent
9157236
commit a0160e8
Showing
5 changed files
with
13 additions
and
9 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
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