@@ -6,17 +6,17 @@ exports[`JSON Schema Example should generate correct schema 1`] = `
6
6
mutation : Mutation
7
7
}
8
8
9
- directive @enum(value: String) on ENUM_VALUE
9
+ directive @enum(subgraph: String, value: String) on ENUM_VALUE
10
10
11
- directive @example(value: ObjMap) repeatable on FIELD_DEFINITION | OBJECT | INPUT_OBJECT | ENUM | SCALAR
11
+ directive @example(subgraph: String, value: ObjMap) repeatable on FIELD_DEFINITION | OBJECT | INPUT_OBJECT | ENUM | SCALAR
12
12
13
- directive @globalOptions(sourceName : String, endpoint : String, operationHeaders : ObjMap, queryStringOptions: ObjMap, queryParams : ObjMap) on OBJECT
13
+ directive @httpOperation(subgraph : String, path : String, operationSpecificHeaders : ObjMap, httpMethod: HttpMethod, isBinary: Boolean, requestBaseBody: ObjMap, queryParamArgMap : ObjMap, queryStringOptionsByParam: ObjMap, jsonApiFields: Boolean ) on FIELD_DEFINITION
14
14
15
- directive @httpOperation(path : String, operationSpecificHeaders: ObjMap, httpMethod: HttpMethod, isBinary: Boolean, requestBaseBody: ObjMap, queryParamArgMap : ObjMap, queryStringOptionsByParam : ObjMap) on FIELD_DEFINITION
15
+ directive @transport(subgraph : String, kind: String, location: String, headers: ObjMap, queryStringOptions : ObjMap, queryParams : ObjMap) on OBJECT
16
16
17
- type Query @globalOptions(sourceName: "FakeAPI", endpoint: "https://not-existing-api.com/API") {
18
- me : User @httpOperation (path : " /me" , httpMethod : GET )
19
- company (id : String ! ): Company @httpOperation (path : " /company/{args.id}" , httpMethod : GET )
17
+ type Query {
18
+ me : User @httpOperation (subgraph : " FakeAPI " , path : " /me" , httpMethod : GET )
19
+ company (id : String ! ): Company @httpOperation (subgraph : " FakeAPI " , path : " /company/{args.id}" , httpMethod : GET )
20
20
}
21
21
22
22
"""Fake User Object"""
@@ -45,18 +45,18 @@ type Company {
45
45
}
46
46
47
47
enum CompanyType {
48
- Public_Limited @enum (value : " \\ " Public Limited \\" " )
49
- Private_Limited @enum (value : " \\ " Private Limited \\" " )
50
- One_Person @enum (value : " \\ " One Person \\" " )
48
+ Public_Limited @enum (subgraph : " FakeAPI " , value : " \\ " Public Limited \\" " )
49
+ Private_Limited @enum (subgraph : " FakeAPI " , value : " \\ " Private Limited \\" " )
50
+ One_Person @enum (subgraph : " FakeAPI " , value : " \\ " One Person \\" " )
51
51
}
52
52
53
53
type Mutation {
54
- createUser (input : CreateUpdateUserInput ): User @httpOperation (path : " /user" , httpMethod : PUT )
55
- updateUser (id : String ! , input : CreateUpdateUserInput ): User @httpOperation (path : " /user/{args.id}" , httpMethod : POST )
56
- deleteUser (id : String ! ): JSON @httpOperation (path : " /user/{args.id}" , httpMethod : DELETE )
54
+ createUser (input : CreateUpdateUserInput ): User @httpOperation (subgraph : " FakeAPI " , path : " /user" , httpMethod : PUT )
55
+ updateUser (id : String ! , input : CreateUpdateUserInput ): User @httpOperation (subgraph : " FakeAPI " , path : " /user/{args.id}" , httpMethod : POST )
56
+ deleteUser (id : String ! ): JSON @httpOperation (subgraph : " FakeAPI " , path : " /user/{args.id}" , httpMethod : DELETE )
57
57
}
58
58
59
- input CreateUpdateUserInput @example(value: "{ \\" firstName\\ " :\\" John\\ " ,\\" lastName\\ " :\\" Doe\\ " ,\\" jobTitle\\ " :\\" Software Developer\\ " } ") {
59
+ input CreateUpdateUserInput @example(subgraph: "FakeAPI", value: "{ \\" firstName\\ " :\\" John\\ " ,\\" lastName\\ " :\\" Doe\\ " ,\\" jobTitle\\ " :\\" Software Developer\\ " } ") {
60
60
firstName : String
61
61
lastName : String
62
62
jobTitle : String
0 commit comments