mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-25 09:45:14 -06:00
45a3d8ee70
This commit addresses issues around vendoring the 3rd party GraphQL parser library, `vektah/gqlparser`, which is used by our GraphQL builtins. By directly depending on the library, we accidentally forced all of our library users to have to match `gqlparser` versions, which could cause problems if they wanted to use downstream GraphQL libraries. To fix this version clash problem, this PR internalizes `vektah/gqlparser` v2.4.8 into the `internal/gqlparser` package (we can update to v2.5.0 later). Scripts are included to automate some of the internalizing process if we wish to update the library in the future. Fixes: #5065 Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
39 lines
808 B
GraphQL
39 lines
808 B
GraphQL
type Query {
|
|
optionalIntArg(i: Int): Boolean!
|
|
intArg(i: Int!): Boolean!
|
|
stringArg(i: String): Boolean!
|
|
boolArg(i: Boolean!): Boolean!
|
|
floatArg(i: Float!): Boolean!
|
|
idArg(i: ID!): Boolean!
|
|
scalarArg(i: Custom!): Boolean!
|
|
structArg(i: InputType!): Boolean!
|
|
defaultStructArg(i: InputType! = {name: "foo"}): Boolean!
|
|
arrayArg(i: [InputType!]): Boolean!
|
|
intArrayArg(i: [Int]): Boolean!
|
|
stringArrayArg(i: [String]): Boolean!
|
|
boolArrayArg(i: [Boolean]): Boolean!
|
|
typeArrayArg(i: [CustomType]): Boolean!
|
|
}
|
|
|
|
input InputType {
|
|
name: String!
|
|
nullName: String
|
|
nullEmbedded: Embedded
|
|
enum: Enum
|
|
defaultName: String! = "defaultFoo"
|
|
}
|
|
|
|
input Embedded {
|
|
name: String!
|
|
}
|
|
|
|
input CustomType {
|
|
and: [Int!]
|
|
}
|
|
|
|
enum Enum {
|
|
A
|
|
}
|
|
|
|
scalar Custom
|