From 40c34dfa0bf44ad388162d92159a525d62fd03b3 Mon Sep 17 00:00:00 2001 From: Grzegorz Pokorski Date: Tue, 28 Mar 2023 17:58:03 +0200 Subject: [PATCH] fix: change extension of graphql files --- apps/api/{schema.gql => schema.graphql} | 70 ++++++++++--------- .../{helloWorld.gql => helloWorld.graphql} | 0 packages/generated/codegen.ts | 4 +- 3 files changed, 39 insertions(+), 35 deletions(-) rename apps/api/{schema.gql => schema.graphql} (53%) rename apps/web/{helloWorld.gql => helloWorld.graphql} (100%) diff --git a/apps/api/schema.gql b/apps/api/schema.graphql similarity index 53% rename from apps/api/schema.gql rename to apps/api/schema.graphql index 07fc514..6b79335 100644 --- a/apps/api/schema.gql +++ b/apps/api/schema.graphql @@ -1,6 +1,8 @@ -"""Auth0 user info""" +""" +Auth0 user info +""" type AuthInfo { - sub: String + sub: String } """ @@ -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 } """ @@ -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! -} \ No newline at end of file + id: ID! +} diff --git a/apps/web/helloWorld.gql b/apps/web/helloWorld.graphql similarity index 100% rename from apps/web/helloWorld.gql rename to apps/web/helloWorld.graphql diff --git a/packages/generated/codegen.ts b/packages/generated/codegen.ts index 1872eef..fb5d2be 100644 --- a/packages/generated/codegen.ts +++ b/packages/generated/codegen.ts @@ -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'],