mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 01:47:13 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			398 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
			
		
		
	
	
			398 lines
		
	
	
		
			7.3 KiB
		
	
	
	
		
			GraphQL
		
	
	
	
	
	
| type Articles {
 | |
|   id: ID!
 | |
|   created_at: DateTime!
 | |
|   updated_at: DateTime!
 | |
|   content2: String
 | |
|   title: String
 | |
|   image: UploadFile
 | |
|   mainTag: Tag
 | |
|   linkedTags(sort: String, limit: Int, start: Int, where: JSON): [Tag]
 | |
|   manyTags(sort: String, limit: Int, start: Int, where: JSON): [Tag]
 | |
| }
 | |
| 
 | |
| input ArticlesInput {
 | |
|   content2: String
 | |
|   title: String
 | |
|   image: ID
 | |
|   mainTag: ID
 | |
|   linkedTags: [ID]
 | |
|   manyTags: [ID]
 | |
| }
 | |
| 
 | |
| input createArticlesInput {
 | |
|   data: ArticlesInput
 | |
| }
 | |
| 
 | |
| type createArticlesPayload {
 | |
|   article: Articles
 | |
| }
 | |
| 
 | |
| input createPostInput {
 | |
|   data: PostInput
 | |
| }
 | |
| 
 | |
| type createPostPayload {
 | |
|   post: Post
 | |
| }
 | |
| 
 | |
| input createRoleInput {
 | |
|   data: RoleInput
 | |
| }
 | |
| 
 | |
| type createRolePayload {
 | |
|   role: UsersPermissionsRole
 | |
| }
 | |
| 
 | |
| input createTagInput {
 | |
|   data: TagInput
 | |
| }
 | |
| 
 | |
| type createTagPayload {
 | |
|   tag: Tag
 | |
| }
 | |
| 
 | |
| input createUserInput {
 | |
|   data: UserInput
 | |
| }
 | |
| 
 | |
| type createUserPayload {
 | |
|   user: UsersPermissionsUser
 | |
| }
 | |
| 
 | |
| """
 | |
| The `DateTime` scalar represents a date and time following the ISO 8601 standard
 | |
| """
 | |
| scalar DateTime
 | |
| 
 | |
| input deleteArticlesInput {
 | |
|   where: InputID
 | |
| }
 | |
| 
 | |
| type deleteArticlesPayload {
 | |
|   article: Articles
 | |
| }
 | |
| 
 | |
| input deletePostInput {
 | |
|   where: InputID
 | |
| }
 | |
| 
 | |
| type deletePostPayload {
 | |
|   post: Post
 | |
| }
 | |
| 
 | |
| input deleteRoleInput {
 | |
|   where: InputID
 | |
| }
 | |
| 
 | |
| type deleteRolePayload {
 | |
|   role: UsersPermissionsRole
 | |
| }
 | |
| 
 | |
| input deleteTagInput {
 | |
|   where: InputID
 | |
| }
 | |
| 
 | |
| type deleteTagPayload {
 | |
|   tag: Tag
 | |
| }
 | |
| 
 | |
| input deleteUserInput {
 | |
|   where: InputID
 | |
| }
 | |
| 
 | |
| type deleteUserPayload {
 | |
|   user: UsersPermissionsUser
 | |
| }
 | |
| 
 | |
| input editArticlesInput {
 | |
|   content2: String
 | |
|   title: String
 | |
|   image: ID
 | |
|   mainTag: ID
 | |
|   linkedTags: [ID]
 | |
|   manyTags: [ID]
 | |
| }
 | |
| 
 | |
| input editFileInput {
 | |
|   name: String
 | |
|   hash: String
 | |
|   sha256: String
 | |
|   ext: String
 | |
|   mime: String
 | |
|   size: String
 | |
|   url: String
 | |
|   provider: String
 | |
|   public_id: String
 | |
|   related: [ID]
 | |
| }
 | |
| 
 | |
| input editPostInput {
 | |
|   title: String
 | |
| }
 | |
| 
 | |
| input editRoleInput {
 | |
|   name: String
 | |
|   description: String
 | |
|   type: String
 | |
|   permissions: [ID]
 | |
|   users: [ID]
 | |
| }
 | |
| 
 | |
| input editTagInput {
 | |
|   name: String
 | |
|   linkedArticles: [ID]
 | |
| }
 | |
| 
 | |
| input editTestInput {
 | |
|   type: String
 | |
| }
 | |
| 
 | |
| input editUserInput {
 | |
|   username: String
 | |
|   email: String
 | |
|   provider: String
 | |
|   password: String
 | |
|   resetPasswordToken: String
 | |
|   confirmed: Boolean
 | |
|   blocked: Boolean
 | |
|   role: ID
 | |
| }
 | |
| 
 | |
| input FileInput {
 | |
|   name: String!
 | |
|   hash: String!
 | |
|   sha256: String
 | |
|   ext: String
 | |
|   mime: String!
 | |
|   size: String!
 | |
|   url: String!
 | |
|   provider: String!
 | |
|   public_id: String
 | |
|   related: [ID]
 | |
| }
 | |
| 
 | |
| input InputID {
 | |
|   id: ID!
 | |
| }
 | |
| 
 | |
| scalar JSON
 | |
| 
 | |
| """The `Long` scalar type represents 52-bit integers"""
 | |
| scalar Long
 | |
| 
 | |
| union Morph = UsersPermissionsMe | UsersPermissionsMeRole | Articles | createArticlesPayload | updateArticlesPayload | deleteArticlesPayload | Post | createPostPayload | updatePostPayload | deletePostPayload | Tag | createTagPayload | updateTagPayload | deleteTagPayload | UploadFile | UsersPermissionsPermission | UsersPermissionsRole | createRolePayload | updateRolePayload | deleteRolePayload | UsersPermissionsUser | createUserPayload | updateUserPayload | deleteUserPayload | MypluginTest
 | |
| 
 | |
| type Mutation {
 | |
|   createArticles(input: createArticlesInput): createArticlesPayload
 | |
|   updateArticles(input: updateArticlesInput): updateArticlesPayload
 | |
|   deleteArticles(input: deleteArticlesInput): deleteArticlesPayload
 | |
|   createPost(input: createPostInput): createPostPayload
 | |
|   updatePost(input: updatePostInput): updatePostPayload
 | |
|   deletePost(input: deletePostInput): deletePostPayload
 | |
|   createTag(input: createTagInput): createTagPayload
 | |
|   updateTag(input: updateTagInput): updateTagPayload
 | |
|   deleteTag(input: deleteTagInput): deleteTagPayload
 | |
| 
 | |
|   """Create a new role"""
 | |
|   createRole(input: createRoleInput): createRolePayload
 | |
| 
 | |
|   """Update an existing role"""
 | |
|   updateRole(input: updateRoleInput): updateRolePayload
 | |
| 
 | |
|   """Delete an existing role"""
 | |
|   deleteRole(input: deleteRoleInput): deleteRolePayload
 | |
| 
 | |
|   """Create a new user"""
 | |
|   createUser(input: createUserInput): createUserPayload
 | |
| 
 | |
|   """Update an existing user"""
 | |
|   updateUser(input: updateUserInput): updateUserPayload
 | |
| 
 | |
|   """Delete an existing user"""
 | |
|   deleteUser(input: deleteUserInput): deleteUserPayload
 | |
|   upload(refId: ID, ref: String, source: String, file: Upload!): UploadFile!
 | |
| }
 | |
| 
 | |
| type MypluginTest {
 | |
|   id: ID!
 | |
|   type: String!
 | |
| }
 | |
| 
 | |
| type Post {
 | |
|   id: ID!
 | |
|   created_at: DateTime!
 | |
|   updated_at: DateTime!
 | |
|   title: String
 | |
| }
 | |
| 
 | |
| input PostInput {
 | |
|   title: String
 | |
| }
 | |
| 
 | |
| type Query {
 | |
|   article(id: ID!): Articles
 | |
|   articles(sort: String, limit: Int, start: Int, where: JSON): [Articles]
 | |
|   post(id: ID!): Post
 | |
|   posts(sort: String, limit: Int, start: Int, where: JSON): [Post]
 | |
|   tag(id: ID!): Tag
 | |
|   tags(sort: String, limit: Int, start: Int, where: JSON): [Tag]
 | |
|   files(sort: String, limit: Int, start: Int, where: JSON): [UploadFile]
 | |
|   role(id: ID!): UsersPermissionsRole
 | |
| 
 | |
|   """
 | |
|   Retrieve all the existing roles. You can't apply filters on this query.
 | |
|   """
 | |
|   roles(sort: String, limit: Int, start: Int, where: JSON): [UsersPermissionsRole]
 | |
|   user(id: ID!): UsersPermissionsUser
 | |
|   users(sort: String, limit: Int, start: Int, where: JSON): [UsersPermissionsUser]
 | |
|   test(id: ID!): MypluginTest
 | |
|   tests(sort: String, limit: Int, start: Int, where: JSON): [MypluginTest]
 | |
|   me: UsersPermissionsMe
 | |
|   userCustomRoute: String
 | |
| }
 | |
| 
 | |
| input RoleInput {
 | |
|   name: String!
 | |
|   description: String
 | |
|   type: String
 | |
|   permissions: [ID]
 | |
|   users: [ID]
 | |
| }
 | |
| 
 | |
| type Tag {
 | |
|   id: ID!
 | |
|   name: String
 | |
|   linkedArticles(sort: String, limit: Int, start: Int, where: JSON): [Articles]
 | |
| }
 | |
| 
 | |
| input TagInput {
 | |
|   name: String
 | |
|   linkedArticles: [ID]
 | |
| }
 | |
| 
 | |
| input TestInput {
 | |
|   type: String!
 | |
| }
 | |
| 
 | |
| input updateArticlesInput {
 | |
|   where: InputID
 | |
|   data: editArticlesInput
 | |
| }
 | |
| 
 | |
| type updateArticlesPayload {
 | |
|   article: Articles
 | |
| }
 | |
| 
 | |
| input updatePostInput {
 | |
|   where: InputID
 | |
|   data: editPostInput
 | |
| }
 | |
| 
 | |
| type updatePostPayload {
 | |
|   post: Post
 | |
| }
 | |
| 
 | |
| input updateRoleInput {
 | |
|   where: InputID
 | |
|   data: editRoleInput
 | |
| }
 | |
| 
 | |
| type updateRolePayload {
 | |
|   role: UsersPermissionsRole
 | |
| }
 | |
| 
 | |
| input updateTagInput {
 | |
|   where: InputID
 | |
|   data: editTagInput
 | |
| }
 | |
| 
 | |
| type updateTagPayload {
 | |
|   tag: Tag
 | |
| }
 | |
| 
 | |
| input updateUserInput {
 | |
|   where: InputID
 | |
|   data: editUserInput
 | |
| }
 | |
| 
 | |
| type updateUserPayload {
 | |
|   user: UsersPermissionsUser
 | |
| }
 | |
| 
 | |
| """The `Upload` scalar type represents a file upload."""
 | |
| scalar Upload
 | |
| 
 | |
| type UploadFile {
 | |
|   id: ID!
 | |
|   created_at: DateTime!
 | |
|   updated_at: DateTime!
 | |
|   name: String!
 | |
|   hash: String!
 | |
|   sha256: String
 | |
|   ext: String
 | |
|   mime: String!
 | |
|   size: String!
 | |
|   url: String!
 | |
|   provider: String!
 | |
|   public_id: String
 | |
|   related(sort: String, limit: Int, start: Int, where: JSON): [Morph]
 | |
| }
 | |
| 
 | |
| input UserInput {
 | |
|   username: String!
 | |
|   email: String!
 | |
|   provider: String
 | |
|   password: String
 | |
|   resetPasswordToken: String
 | |
|   confirmed: Boolean
 | |
|   blocked: Boolean
 | |
|   role: ID
 | |
| }
 | |
| 
 | |
| type UsersPermissionsMe {
 | |
|   _id: ID!
 | |
|   username: String!
 | |
|   email: String!
 | |
|   confirmed: Boolean
 | |
|   blocked: Boolean
 | |
|   role: UsersPermissionsMeRole
 | |
| }
 | |
| 
 | |
| type UsersPermissionsMeRole {
 | |
|   _id: ID!
 | |
|   name: String!
 | |
|   description: String
 | |
|   type: String
 | |
| }
 | |
| 
 | |
| type UsersPermissionsPermission {
 | |
|   id: ID!
 | |
|   type: String!
 | |
|   controller: String!
 | |
|   action: String!
 | |
|   enabled: Boolean!
 | |
|   policy: String
 | |
|   role: UsersPermissionsRole
 | |
| }
 | |
| 
 | |
| type UsersPermissionsRole {
 | |
|   id: ID!
 | |
|   name: String!
 | |
|   description: String
 | |
|   type: String
 | |
|   permissions(sort: String, limit: Int, start: Int, where: JSON): [UsersPermissionsPermission]
 | |
|   users(sort: String, limit: Int, start: Int, where: JSON): [UsersPermissionsUser]
 | |
| }
 | |
| 
 | |
| type UsersPermissionsUser {
 | |
|   id: ID!
 | |
|   created_at: DateTime!
 | |
|   updated_at: DateTime!
 | |
|   username: String!
 | |
|   email: String!
 | |
|   provider: String
 | |
|   confirmed: Boolean
 | |
|   blocked: Boolean
 | |
|   role: UsersPermissionsRole
 | |
| }
 | 
