cli: introduce the export_graphql_schema command

Split the command line into subcommands `run` and
`export_graphql_schema`.
This commit is contained in:
Valentin Tolmer
2021-08-26 21:46:00 +02:00
committed by nitnelave
parent d2617e08a7
commit a08b9a556d
6 changed files with 103 additions and 8 deletions

38
schema.graphql Normal file
View File

@@ -0,0 +1,38 @@
input EqualityConstraint {
field: String!
value: String!
}
type Group {
id: String!
"The groups to which this user belongs."
users: [User!]!
}
"""
A filter for requests, specifying a boolean expression based on field constraints. Only one of
the fields can be set at a time.
"""
input RequestFilter {
any: [RequestFilter!]
all: [RequestFilter!]
not: RequestFilter
eq: EqualityConstraint
}
type Query {
apiVersion: String!
user(userId: String!): User!
users(filters: RequestFilter): [User!]!
}
type User {
id: String!
email: String!
"The groups to which this user belongs."
groups: [Group!]!
}
schema {
query: Query
}