0.0.33 • Published 4 months ago
@theconcurrent/graphiql-query-generator v0.0.33
@theconcurrent/graphiql-query-generator
Table of Contents
Introduction
Getting Started
yarn add @theconcurrent/graphiql-query-generator
const config = {
adminPath: 'admin',
nodeRepresentatives: ['id'],
resources: [
{
name: 'Announcement',
list: {},
show: {},
create: { path: 'announcementCreate.announcement' },
update: { path: 'announcementUpdate.announcement' },
delete: { path: 'announcementDelete.announcement' },
},
],
collection: {
dataPath: 'nodes',
totalPath: 'totalCount',
typeNameSuffix: 'Collection',
},
};
# schema.graphql
type Query {
admin: Admin
}
type Admin {
user(id: ID): User
userList: UserCollection!
}
type User {
id: ID
name: String
}
type UserCollection {
nodes: [User!]
totalCount: Int
}
input UserCreateInput {
userInput: UserInput!
clientMutationId: String
}
input UserInput {
name: String
}
type UserCreatePayload {
user: User!
clientMutationId: String
}
type UserDeletePayload {
user: User!
clientMutationId: String
}
input UserDeleteInput {
clientMutationId: String
id: ID!
}
type UserUpdatePayload {
user: User!
clientMutationId: String
}
input UserUpdateInput {
userInput: UserInput!
clientMutationId: String
id: ID!
}
type Mutation {
userCreate(input: UserCreateInput!): UserCreatePayload
userDelete(input: UserDeleteInput!): UserDeletePayload
userUpdate(input: UserUpdateInput!): UserUpdatePayload
}
0.0.33
4 months ago
0.0.30
5 months ago
0.0.31
5 months ago
0.0.27
6 months ago
0.0.28
6 months ago
0.0.29
5 months ago
0.0.26
6 months ago
0.0.25
6 months ago
0.0.24
6 months ago
0.0.23
6 months ago
0.0.22
6 months ago
0.0.21
6 months ago
0.0.20
6 months ago
0.0.19
7 months ago
0.0.18
7 months ago
0.0.17
7 months ago
0.0.16
8 months ago
0.0.15
8 months ago
0.0.14
8 months ago
0.0.13
8 months ago
0.0.12
8 months ago
0.0.11
8 months ago
0.0.10
8 months ago
0.0.9
8 months ago
0.0.8
8 months ago
0.0.7
8 months ago
0.0.6
9 months ago