Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 37 additions & 33 deletions apps/api/schema.gql → apps/api/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Auth0 user info"""
"""
Auth0 user info
"""
type AuthInfo {
sub: String
sub: String
}

"""
Expand All @@ -9,8 +11,8 @@ A date string, such as 2007-12-03, compliant with the `full-date` format outline
scalar Date

input DateRangeInput {
gte: Date
lte: Date
gte: Date
lte: Date
}

"""
Expand All @@ -19,55 +21,57 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `dat
scalar DateTime

input NumberRangeInput {
gte: Int
lte: Int
gte: Int
lte: Int
}

input PaginationInput {
page: Int = 1
perPage: Int = 10
page: Int = 1
perPage: Int = 10
}

type Query {
"""Auth0 context info"""
authInfo: AuthInfo
tasks(filter: TaskFilterInput, pagination: PaginationInput): [Task!]!
"""
Auth0 context info
"""
authInfo: AuthInfo
tasks(filter: TaskFilterInput, pagination: PaginationInput): [Task!]!
}

scalar SearchString

type Task {
author: User!
description: String!
difficulty: String!
id: ID!
rating: Int!
status: String!
thumbnailUrl: String!
title: String!
author: User!
description: String!
difficulty: String!
id: ID!
rating: Int!
status: String!
thumbnailUrl: String!
title: String!
}

enum TaskDifficulty {
ADVANCED
BEGINNER
INTERMEDIATE
ADVANCED
BEGINNER
INTERMEDIATE
}

input TaskFilterInput {
created_at: DateRangeInput
description: SearchString
difficulty: TaskDifficulty
status: TaskStatus = ACTIVE
title: SearchString
updated_at: DateRangeInput
created_at: DateRangeInput
description: SearchString
difficulty: TaskDifficulty
status: TaskStatus = ACTIVE
title: SearchString
updated_at: DateRangeInput
}

enum TaskStatus {
ACTIVE
IN_REVIEW
REJECTED
ACTIVE
IN_REVIEW
REJECTED
}

type User {
id: ID!
}
id: ID!
}
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/generated/codegen.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: '../../apps/api/schema.gql',
documents: ['../../apps/web/**/*.gql'],
schema: '../../apps/api/schema.graphql',
documents: ['../../apps/web/**/*.graphql'],
generates: {
'./generated.ts': {
plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo', 'typescript-resolvers'],
Expand Down