tercul-backend/graphql/schema.graphqls
Damir Mukimov 4957117cb6 Initial commit: Tercul Go project with comprehensive architecture
- Core Go application with GraphQL API using gqlgen
- Comprehensive data models for literary works, authors, translations
- Repository pattern with caching layer
- Authentication and authorization system
- Linguistics analysis capabilities with multiple adapters
- Vector search integration with Weaviate
- Docker containerization support
- Python data migration and analysis scripts
- Clean architecture with proper separation of concerns
- Production-ready configuration and middleware
- Proper .gitignore excluding vendor/, database files, and build artifacts
2025-08-13 07:42:32 +02:00

419 lines
5.6 KiB
GraphQL

schema {
query: Query
}
type Query {
work(id: ID!): Work
works(filter: WorkFilter, limit: Int, offset: Int): [Work!]!
translation(id: ID!): Translation
author(id: ID!): Author
user(id: ID!): User
media(id: ID!): Media
book(id: ID!): Book
}
input WorkFilter {
name: String
language: String
}
type Work {
id: ID!
name: String
language: String
source: Source
embedding: Embedding
copyright: Copyright
collection: Collection
tags: [Tag]
readabilityScore: ReadabilityScore
media: [Media]
writingStyle: WritingStyle
emotion: Emotion
translations: [Translation]
category: Category
topicCluster: TopicCluster
mood: Mood
concept: Concept
linguisticLayer: LinguisticLayer
workStats: WorkStats
textMetadata: TextMetadata
poeticAnalysis: PoeticAnalysis
hybridEntityWork: HybridEntity_Work
copyrightClaim: CopyrightClaim
}
type Translation {
id: ID!
name: String
language: String
work: Work
embedding: Embedding
translationStats: TranslationStats
hybridEntityWork: HybridEntity_Work
copyright: Copyright
copyrightClaim: CopyrightClaim
}
type TopicCluster {
id: ID!
name: String
works: [Work]
}
type Emotion {
id: ID!
name: String
language: String
user: User
work: Work
collection: Collection
}
type Embedding {
id: ID!
vector: [Float]
work: Work
translation: Translation
}
type Gamification {
id: ID!
name: String
user: User
}
type Contribution {
id: ID!
name: String
user: User
}
type Stats {
id: ID!
name: String
user: User
work: Work
}
type LanguageAnalysis {
id: ID!
name: String
work: Work
}
type WritingStyle {
id: ID!
name: String
language: String
work: Work
}
type Media {
id: ID!
name: String
language: String
author: Author
translation: Translation
country: Country
city: City
mediaStats: MediaStats
copyright: Copyright
copyrightClaim: CopyrightClaim
}
type Collection {
id: ID!
name: String
works: [Work]
collectionStats: CollectionStats
}
type Bookmark {
id: ID!
name: String
work: Work
}
type Word {
id: ID!
name: String
concept: Concept
work: Work
}
type Copyright {
id: ID!
name: String
language: String
workOwner: Author
}
type Admin {
id: ID!
name: String
user: User
work: Work
}
type Author {
id: ID!
name: String
language: String
works: [Work]
books: [Book]
country: Country
city: City
place: Place
address: Address
copyrightClaim: CopyrightClaim
copyright: Copyright
}
type Category {
id: ID!
name: String
works: [Work]
}
type User {
id: ID!
name: String
works: [Work]
bookmarks: [Bookmark]
translations: [Translation]
collections: [Collection]
likes: [Like]
comments: [Comment]
authors: [Author]
topicClusters: [TopicCluster]
country: Country
city: City
userStats: UserStats
books: [Book]
media: [Media]
address: Address
emotions: [Emotion]
copyrightClaims: [CopyrightClaim]
}
type Book {
id: ID!
name: String
language: String
works: [Work]
bookStats: BookStats
copyright: Copyright
copyrightClaim: CopyrightClaim
}
type Source {
id: ID!
name: String
language: String
copyrights: [Copyright]
copyrightClaims: [CopyrightClaim]
}
type Tag {
id: ID!
name: String
works: [Work]
}
type Concept {
id: ID!
name: String
words: [Word]
works: [Work]
}
type Comment {
id: ID!
text: String
user: User
work: Work
}
type ReadabilityScore {
id: ID!
score: Float
language: String
work: Work
}
type LanguageEntity {
id: ID!
name: String
}
type Vote {
id: ID!
value: Int
user: User
}
type Edition {
id: ID!
version: String
book: Book
work: Work
}
type LinguisticLayer {
id: ID!
name: String
language: String
works: [Work]
}
type Mood {
id: ID!
name: String
language: String
works: [Work]
}
type Like {
id: ID!
name: String
user: User
}
type Notification {
id: ID!
message: String
language: String
user: User
}
type EditorialWorkflow {
id: ID!
stage: String
language: String
work: Work
}
type Monetization {
id: ID!
amount: Float
language: String
author: Author
work: Work
}
type Country {
id: ID!
name: String
language: String
users: [User]
media: [Media]
authors: [Author]
}
type City {
id: ID!
name: String
language: String
users: [User]
media: [Media]
authors: [Author]
}
type Address {
id: ID!
street: String
city: City
place: Place
}
type WorkStats {
id: ID!
views: Int
work: Work
}
type TranslationStats {
id: ID!
views: Int
translation: Translation
}
type MediaStats {
id: ID!
views: Int
media: Media
}
type UserStats {
id: ID!
activity: Int
user: User
}
type Place {
id: ID!
name: String
language: String
authors: [Author]
}
type BookStats {
id: ID!
sales: Int
book: Book
}
type CollectionStats {
id: ID!
items: Int
collection: Collection
}
type TextMetadata {
id: ID!
analysis: String
language: String
work: Work
translation: Translation
copyright: Copyright
}
type PoeticAnalysis {
id: ID!
structure: String
language: String
work: Work
copyright: Copyright
copyrightClaim: CopyrightClaim
}
type HybridEntity_Work {
id: ID!
name: String
work: Work
translation: Translation
topicCluster: TopicCluster
}
type CopyrightClaim {
id: ID!
details: String
work: Work
translation: Translation
author: Author
source: Source
contributor: Contributor
}
type Contributor {
id: ID!
name: String
copyrightClaims: [CopyrightClaim]
copyrights: [Copyright]
contributions: [Contribution]
gamification: [Gamification]
works: [Work]
media: [Media]
}