-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdirectives.rb
More file actions
57 lines (51 loc) · 1.84 KB
/
directives.rb
File metadata and controls
57 lines (51 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# frozen_string_literal: true
module GraphQL::Stitching
module Directives
class Stitch < GraphQL::Schema::Directive
graphql_name "stitch"
locations FIELD_DEFINITION
argument :key, String, required: true
argument :arguments, String, required: false
argument :type_name, String, required: false
repeatable true
end
class Visibility < GraphQL::Schema::Directive
graphql_name "visibility"
locations(
OBJECT, INTERFACE, UNION, INPUT_OBJECT, ENUM, SCALAR,
FIELD_DEFINITION, ARGUMENT_DEFINITION, INPUT_FIELD_DEFINITION, ENUM_VALUE
)
argument :profiles, [String, null: false], required: true
end
class Authorization < GraphQL::Schema::Directive
graphql_name "authorization"
locations(FIELD_DEFINITION, OBJECT, INTERFACE, ENUM, SCALAR)
argument :scopes, [[String, null: false], null: false], required: true
end
class SupergraphKey < GraphQL::Schema::Directive
graphql_name "key"
locations OBJECT, INTERFACE, UNION
argument :key, String, required: true
argument :location, String, required: true
repeatable true
end
class SupergraphResolver < GraphQL::Schema::Directive
graphql_name "resolver"
locations OBJECT, INTERFACE, UNION
argument :location, String, required: true
argument :list, Boolean, required: false
argument :key, String, required: true
argument :field, String, required: true
argument :arguments, String, required: true
argument :argument_types, String, required: true
argument :type_name, String, required: false
repeatable true
end
class SupergraphSource < GraphQL::Schema::Directive
graphql_name "source"
locations FIELD_DEFINITION
argument :location, String, required: true
repeatable true
end
end
end