-
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.
Add directives to the base project resolvers (types/fields)
Summary: We need this directive to correctly skip fragment generation with multi-projects where projects have a dependency on a `base` project. When a `project` depends on the `base`, the assumption is that all schema types and fields from the `base` are available for the project. For resolvers, it means we're adding all "base" resolvers to the current project. This leads to a situation where the transforms, such as `generate_relay_resolvers_model_fragments.rs`, that are responsible for creating additional documents for resolvers, are generating documents for both the current project and the `base` project. To prevent generation for `base` project, we will mark `base` project resolver-types, and fields with the directive `@__belongs_to_base_schema`. This directive will instruct us to skip adding fragments for such fields and objects. Reviewed By: captbaritone Differential Revision: D49014147 fbshipit-source-id: b787702024bbaab4be48ce3067e35db34a06b1b3
- Loading branch information
1 parent
3837d37
commit c93322b
Showing
5 changed files
with
194 additions
and
41 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