graphql.view.graphqls Maven / Gradle / Ivy
extend type Query {
list(key: ID!): MainListView!
detail(key: ID!): DetailView!
}
interface ListView {
count(filter: String): Int!
data(filter: String, range: Range!): JSON!
}
type MainListView implements ListView {
id: ID!
schema: JSON!
links: [Link!]!
link(key: ID!): Link!
count(filter: String): Int!
data(filter: String, range: Range!): JSON!
}
type NestedListView implements ListView {
count(filter: String): Int! # returns -1 if the nested list is disabled
data(filter: String, range: Range!): JSON! # returns a JSON null value if the nested list is disabled
}
type DetailView {
id: ID!
schema: JSON!
audited: Boolean!
links: [Link!]!
instance(id: ID!): DetailInstance!
}
type DetailInstance {
id: ID!
data: JSON!
list(key: ID!): NestedListView!
links: [Link!]!
link(key: ID!): Link!
enabledSectionKeys: [ID!]!
revisions: [Revision!]!
}
type Link {
id: ID!
key: String!
ref: String!
label: String
icon: String
kind: LinkKind!
conditional: Boolean!
enabled: Boolean # will never be false if conditional is false. null indicates unknown.
processKey: String # will be null if kind is OTHER
formValues: JSON! # only valid when kind is PROCESS_FILL or PROCESS_SUBMIT
}
enum LinkKind {
PROCESS_OPEN
PROCESS_FILL
PROCESS_SUBMIT
OTHER
}
type Revision {
rev: Int!
timestamp: DateTime!
}