Added Graphql
This commit is contained in:
46
tests/assets/graphql/complex.graphql
Normal file
46
tests/assets/graphql/complex.graphql
Normal file
@@ -0,0 +1,46 @@
|
||||
# Complex GraphQL schema with multiple features
|
||||
|
||||
scalar DateTime
|
||||
scalar JSON
|
||||
scalar Date
|
||||
|
||||
enum Role {
|
||||
USER
|
||||
ADMIN
|
||||
MODERATOR
|
||||
}
|
||||
|
||||
type User {
|
||||
id: ID!
|
||||
email: String!
|
||||
name: String!
|
||||
role: Role!
|
||||
createdAt: DateTime!
|
||||
posts: [Post!]!
|
||||
profile: Profile
|
||||
}
|
||||
|
||||
type Profile {
|
||||
id: ID!
|
||||
bio: String
|
||||
avatar: String
|
||||
metadata: JSON
|
||||
user: User!
|
||||
}
|
||||
|
||||
type Post {
|
||||
id: ID!
|
||||
title: String!
|
||||
slug: String!
|
||||
content: String
|
||||
published: Boolean!
|
||||
publishedAt: Date
|
||||
author: User!
|
||||
tags: [Tag!]!
|
||||
}
|
||||
|
||||
type Tag {
|
||||
id: ID!
|
||||
name: String!
|
||||
posts: [Post!]!
|
||||
}
|
||||
13
tests/assets/graphql/custom_scalars.graphql
Normal file
13
tests/assets/graphql/custom_scalars.graphql
Normal file
@@ -0,0 +1,13 @@
|
||||
# GraphQL schema with custom scalars
|
||||
|
||||
scalar DateTime
|
||||
scalar JSON
|
||||
scalar Date
|
||||
|
||||
type User {
|
||||
id: ID!
|
||||
email: String!
|
||||
createdAt: DateTime!
|
||||
metadata: JSON
|
||||
birthDate: Date
|
||||
}
|
||||
13
tests/assets/graphql/enums.graphql
Normal file
13
tests/assets/graphql/enums.graphql
Normal file
@@ -0,0 +1,13 @@
|
||||
# GraphQL schema with enums
|
||||
|
||||
enum Role {
|
||||
ADMIN
|
||||
USER
|
||||
GUEST
|
||||
}
|
||||
|
||||
type User {
|
||||
id: ID!
|
||||
email: String!
|
||||
role: Role!
|
||||
}
|
||||
16
tests/assets/graphql/relations.graphql
Normal file
16
tests/assets/graphql/relations.graphql
Normal file
@@ -0,0 +1,16 @@
|
||||
# GraphQL schema with relationships
|
||||
|
||||
type User {
|
||||
id: ID!
|
||||
email: String!
|
||||
name: String!
|
||||
posts: [Post!]!
|
||||
}
|
||||
|
||||
type Post {
|
||||
id: ID!
|
||||
title: String!
|
||||
content: String
|
||||
published: Boolean!
|
||||
author: User!
|
||||
}
|
||||
9
tests/assets/graphql/simple.graphql
Normal file
9
tests/assets/graphql/simple.graphql
Normal file
@@ -0,0 +1,9 @@
|
||||
# Simple GraphQL schema for testing basic type parsing
|
||||
|
||||
type User {
|
||||
id: ID!
|
||||
email: String!
|
||||
name: String
|
||||
age: Int
|
||||
active: Boolean!
|
||||
}
|
||||
Reference in New Issue
Block a user