Added Graphql

This commit is contained in:
2025-12-28 11:41:55 +02:00
parent 666eab7cec
commit f98b278d72
18 changed files with 2564 additions and 4 deletions

View 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!]!
}

View 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
}

View File

@@ -0,0 +1,13 @@
# GraphQL schema with enums
enum Role {
ADMIN
USER
GUEST
}
type User {
id: ID!
email: String!
role: Role!
}

View 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!
}

View 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!
}