-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #501 from jimmystewpot/oneOf_support_in_introspect…
…ion_query extend introspection schema to include oneOf and specifiedByURL
- Loading branch information
Showing
9 changed files
with
402 additions
and
17 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
graphql_client_cli/src/graphql/introspection_query_with_isOneOf_specifiedByUrl.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
query IntrospectionQueryWithIsOneOfSpecifiedByURL { | ||
__schema { | ||
queryType { | ||
name | ||
} | ||
mutationType { | ||
name | ||
} | ||
subscriptionType { | ||
name | ||
} | ||
types { | ||
...FullTypeWithisOneOfSpecifiedByURL | ||
} | ||
directives { | ||
name | ||
description | ||
locations | ||
args { | ||
...InputValue | ||
} | ||
} | ||
} | ||
} | ||
|
||
fragment FullTypeWithisOneOfSpecifiedByURL on __Type { | ||
kind | ||
name | ||
description | ||
isOneOf | ||
specifiedByURL | ||
fields(includeDeprecated: true) { | ||
name | ||
description | ||
args { | ||
...InputValue | ||
} | ||
type { | ||
...TypeRef | ||
} | ||
isDeprecated | ||
deprecationReason | ||
} | ||
inputFields { | ||
...InputValue | ||
} | ||
interfaces { | ||
...TypeRef | ||
} | ||
enumValues(includeDeprecated: true) { | ||
name | ||
description | ||
isDeprecated | ||
deprecationReason | ||
} | ||
possibleTypes { | ||
...TypeRef | ||
} | ||
} | ||
|
||
fragment InputValue on __InputValue { | ||
name | ||
description | ||
type { | ||
...TypeRef | ||
} | ||
defaultValue | ||
} | ||
|
||
fragment TypeRef on __Type { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
graphql_client_cli/src/graphql/introspection_query_with_is_one_of.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
query IntrospectionQueryWithIsOneOf { | ||
__schema { | ||
queryType { | ||
name | ||
} | ||
mutationType { | ||
name | ||
} | ||
subscriptionType { | ||
name | ||
} | ||
types { | ||
...FullTypeWithisOneOf | ||
} | ||
directives { | ||
name | ||
description | ||
locations | ||
args { | ||
...InputValue | ||
} | ||
} | ||
} | ||
} | ||
|
||
fragment FullTypeWithisOneOf on __Type { | ||
kind | ||
name | ||
description | ||
isOneOf | ||
fields(includeDeprecated: true) { | ||
name | ||
description | ||
args { | ||
...InputValue | ||
} | ||
type { | ||
...TypeRef | ||
} | ||
isDeprecated | ||
deprecationReason | ||
} | ||
inputFields { | ||
...InputValue | ||
} | ||
interfaces { | ||
...TypeRef | ||
} | ||
enumValues(includeDeprecated: true) { | ||
name | ||
description | ||
isDeprecated | ||
deprecationReason | ||
} | ||
possibleTypes { | ||
...TypeRef | ||
} | ||
} | ||
|
||
fragment InputValue on __InputValue { | ||
name | ||
description | ||
type { | ||
...TypeRef | ||
} | ||
defaultValue | ||
} | ||
|
||
fragment TypeRef on __Type { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
graphql_client_cli/src/graphql/introspection_query_with_specified_by.graphql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
query IntrospectionQueryWithSpecifiedBy { | ||
__schema { | ||
queryType { | ||
name | ||
} | ||
mutationType { | ||
name | ||
} | ||
subscriptionType { | ||
name | ||
} | ||
types { | ||
...FullTypeWithSpecifiedBy | ||
} | ||
directives { | ||
name | ||
description | ||
locations | ||
args { | ||
...InputValue | ||
} | ||
} | ||
} | ||
} | ||
|
||
fragment FullTypeWithSpecifiedBy on __Type { | ||
kind | ||
name | ||
description | ||
specifiedByURL | ||
fields(includeDeprecated: true) { | ||
name | ||
description | ||
args { | ||
...InputValue | ||
} | ||
type { | ||
...TypeRef | ||
} | ||
isDeprecated | ||
deprecationReason | ||
} | ||
inputFields { | ||
...InputValue | ||
} | ||
interfaces { | ||
...TypeRef | ||
} | ||
enumValues(includeDeprecated: true) { | ||
name | ||
description | ||
isDeprecated | ||
deprecationReason | ||
} | ||
possibleTypes { | ||
...TypeRef | ||
} | ||
} | ||
|
||
fragment InputValue on __InputValue { | ||
name | ||
description | ||
type { | ||
...TypeRef | ||
} | ||
defaultValue | ||
} | ||
|
||
fragment TypeRef on __Type { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
ofType { | ||
kind | ||
name | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use graphql_client::GraphQLQuery; | ||
|
||
#[derive(GraphQLQuery)] | ||
#[graphql( | ||
schema_path = "src/graphql/introspection_schema.graphql", | ||
query_path = "src/graphql/introspection_query.graphql", | ||
response_derives = "Serialize", | ||
variable_derives = "Deserialize" | ||
)] | ||
#[allow(dead_code)] | ||
pub struct IntrospectionQuery; | ||
|
||
#[derive(GraphQLQuery)] | ||
#[graphql( | ||
schema_path = "src/graphql/introspection_schema.graphql", | ||
query_path = "src/graphql/introspection_query_with_is_one_of.graphql", | ||
response_derives = "Serialize", | ||
variable_derives = "Deserialize" | ||
)] | ||
#[allow(dead_code)] | ||
pub struct IntrospectionQueryWithIsOneOf; | ||
|
||
#[derive(GraphQLQuery)] | ||
#[graphql( | ||
schema_path = "src/graphql/introspection_schema.graphql", | ||
query_path = "src/graphql/introspection_query_with_specified_by.graphql", | ||
response_derives = "Serialize", | ||
variable_derives = "Deserialize" | ||
)] | ||
#[allow(dead_code)] | ||
pub struct IntrospectionQueryWithSpecifiedBy; | ||
|
||
#[derive(GraphQLQuery)] | ||
#[graphql( | ||
schema_path = "src/graphql/introspection_schema.graphql", | ||
query_path = "src/graphql/introspection_query_with_isOneOf_specifiedByUrl.graphql", | ||
response_derives = "Serialize", | ||
variable_derives = "Deserialize" | ||
)] | ||
#[allow(dead_code)] | ||
pub struct IntrospectionQueryWithIsOneOfSpecifiedByURL; |
Oops, something went wrong.