Query Plugin
Source Code
GraphQL Schema
For datamodel below
type Query {
user(where: UserWhereUniqueInput!): User
users(where: UserWhereInput, first: Int, last: Int, before: String, after: String): [User]
}
type User {
id: ID!
username: String!
email: String
}
input UserWhereInput {
id: ID
username: String
email: String
}
input UserWhereUniqueInput {
id: ID
}
About this plugin
This plugin will create two queries, in this example: user
and users
, to allow users to query one or many records from data-source.