Skip to content

Commit

Permalink
Call out @Migrate as a khan-specific directive
Browse files Browse the repository at this point in the history
This audit moves the `@migrate` directive to a separate, commented
section so that it's clear that the directive is khan-specific. At some
point we'd like to discover khan-specific directives automatically.

Issue: see rKLefcb6f0fd2

Test plan:
ka-lint services/*/*.graphql in KA root

Auditors: csilvers
  • Loading branch information
dnerdy committed Apr 10, 2020
1 parent 0e94178 commit 6c46aea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,11 +857,13 @@ def process(self, f, contents_of_f):
contents_of_f += """
scalar _FieldSet
directive @external on FIELD_DEFINITION
directive @migrate(from: String!, state: String!) on FIELD_DEFINITION
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
directive @extends on OBJECT | INTERFACE
# Khan-specific directives
directive @migrate(from: String!, state: String!) on FIELD_DEFINITION
"""

schema_files = glob.glob(os.path.join(os.path.dirname(f), '*.graphql'))
Expand Down

0 comments on commit 6c46aea

Please sign in to comment.