fix: update operation IDs to string type in GraphQL schema
Change the type of the `id` field from `Int` to `String` in the GraphQL schema for `Band`, `DanceHall`, and `Event` types. This improves consistency in data representation. Also, modify the `codegen` command in `package.json` to simplify the linting process for generated files, ensuring cleaner code practices.
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
schema: ./graphql/schema.graphql
|
schema: http://localhost:6080/query
|
||||||
documents: './graphql/**/*.graphql'
|
documents: './graphql/**/*.graphql'
|
||||||
generates:
|
generates:
|
||||||
./graphql/generated/operations.ts:
|
./graphql/generated/operations.ts:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export type Scalars = {
|
|||||||
export type Band = {
|
export type Band = {
|
||||||
__typename?: 'Band'
|
__typename?: 'Band'
|
||||||
created: Scalars['LocalDateTime']['output']
|
created: Scalars['LocalDateTime']['output']
|
||||||
id: Maybe<Scalars['Int']['output']>
|
id: Maybe<Scalars['String']['output']>
|
||||||
name: Scalars['String']['output']
|
name: Scalars['String']['output']
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export type DanceHall = {
|
|||||||
__typename?: 'DanceHall'
|
__typename?: 'DanceHall'
|
||||||
city: Maybe<Scalars['String']['output']>
|
city: Maybe<Scalars['String']['output']>
|
||||||
created: Scalars['LocalDateTime']['output']
|
created: Scalars['LocalDateTime']['output']
|
||||||
id: Maybe<Scalars['Int']['output']>
|
id: Maybe<Scalars['String']['output']>
|
||||||
latitude: Maybe<Scalars['Float']['output']>
|
latitude: Maybe<Scalars['Float']['output']>
|
||||||
longitude: Maybe<Scalars['Float']['output']>
|
longitude: Maybe<Scalars['Float']['output']>
|
||||||
municipality: Maybe<Scalars['String']['output']>
|
municipality: Maybe<Scalars['String']['output']>
|
||||||
@@ -64,7 +64,7 @@ export type Event = {
|
|||||||
distances: Array<DanceHallDistance>
|
distances: Array<DanceHallDistance>
|
||||||
/** Additional information regarding the event */
|
/** Additional information regarding the event */
|
||||||
extraInfo: Maybe<Scalars['String']['output']>
|
extraInfo: Maybe<Scalars['String']['output']>
|
||||||
id: Maybe<Scalars['Int']['output']>
|
id: Maybe<Scalars['String']['output']>
|
||||||
/** The time of the event */
|
/** The time of the event */
|
||||||
time: Maybe<Scalars['String']['output']>
|
time: Maybe<Scalars['String']['output']>
|
||||||
}
|
}
|
||||||
@@ -87,30 +87,37 @@ export type Mutation = {
|
|||||||
ToggleIgnoreState: Scalars['Boolean']['output']
|
ToggleIgnoreState: Scalars['Boolean']['output']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationRemoveOriginArgs = {
|
export type MutationRemoveOriginArgs = {
|
||||||
origin: Scalars['String']['input']
|
origin: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationSaveOriginArgs = {
|
export type MutationSaveOriginArgs = {
|
||||||
origin: Scalars['String']['input']
|
origin: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationToggleIgnoreBandArgs = {
|
export type MutationToggleIgnoreBandArgs = {
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationToggleIgnoreCityArgs = {
|
export type MutationToggleIgnoreCityArgs = {
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationToggleIgnoreDanceHallArgs = {
|
export type MutationToggleIgnoreDanceHallArgs = {
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationToggleIgnoreMunicipalityArgs = {
|
export type MutationToggleIgnoreMunicipalityArgs = {
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type MutationToggleIgnoreStateArgs = {
|
export type MutationToggleIgnoreStateArgs = {
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
@@ -139,10 +146,12 @@ export type Query = {
|
|||||||
Origins: Array<Scalars['String']['output']>
|
Origins: Array<Scalars['String']['output']>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type QueryAddressFromLatLngArgs = {
|
export type QueryAddressFromLatLngArgs = {
|
||||||
latlng: Scalars['String']['input']
|
latlng: Scalars['String']['input']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type QueryEventsArgs = {
|
export type QueryEventsArgs = {
|
||||||
includeHidden?: InputMaybe<Scalars['Boolean']['input']>
|
includeHidden?: InputMaybe<Scalars['Boolean']['input']>
|
||||||
origins?: InputMaybe<Array<Scalars['String']['input']>>
|
origins?: InputMaybe<Array<Scalars['String']['input']>>
|
||||||
@@ -162,52 +171,61 @@ export type RemoveOriginMutationVariables = Exact<{
|
|||||||
origin: Scalars['String']['input']
|
origin: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type RemoveOriginMutation = { __typename?: 'Mutation'; removed: boolean }
|
export type RemoveOriginMutation = { __typename?: 'Mutation'; removed: boolean }
|
||||||
|
|
||||||
export type SaveOriginMutationVariables = Exact<{
|
export type SaveOriginMutationVariables = Exact<{
|
||||||
origin: Scalars['String']['input']
|
origin: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type SaveOriginMutation = { __typename?: 'Mutation'; saved: boolean }
|
export type SaveOriginMutation = { __typename?: 'Mutation'; saved: boolean }
|
||||||
|
|
||||||
export type ToggleIgnoreBandMutationVariables = Exact<{
|
export type ToggleIgnoreBandMutationVariables = Exact<{
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type ToggleIgnoreBandMutation = { __typename?: 'Mutation'; ignore: boolean }
|
export type ToggleIgnoreBandMutation = { __typename?: 'Mutation'; ignore: boolean }
|
||||||
|
|
||||||
export type ToggleIgnoreCityMutationVariables = Exact<{
|
export type ToggleIgnoreCityMutationVariables = Exact<{
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type ToggleIgnoreCityMutation = { __typename?: 'Mutation'; ignore: boolean }
|
export type ToggleIgnoreCityMutation = { __typename?: 'Mutation'; ignore: boolean }
|
||||||
|
|
||||||
export type ToggleIgnoreDanceHallMutationVariables = Exact<{
|
export type ToggleIgnoreDanceHallMutationVariables = Exact<{
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type ToggleIgnoreDanceHallMutation = { __typename?: 'Mutation'; ignore: boolean }
|
export type ToggleIgnoreDanceHallMutation = { __typename?: 'Mutation'; ignore: boolean }
|
||||||
|
|
||||||
export type ToggleIgnoreMunicipalityMutationVariables = Exact<{
|
export type ToggleIgnoreMunicipalityMutationVariables = Exact<{
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type ToggleIgnoreMunicipalityMutation = { __typename?: 'Mutation'; ignore: boolean }
|
export type ToggleIgnoreMunicipalityMutation = { __typename?: 'Mutation'; ignore: boolean }
|
||||||
|
|
||||||
export type ToggleIgnoreStateMutationVariables = Exact<{
|
export type ToggleIgnoreStateMutationVariables = Exact<{
|
||||||
name: Scalars['String']['input']
|
name: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type ToggleIgnoreStateMutation = { __typename?: 'Mutation'; ignore: boolean }
|
export type ToggleIgnoreStateMutation = { __typename?: 'Mutation'; ignore: boolean }
|
||||||
|
|
||||||
export type FetchAddressQueryVariables = Exact<{
|
export type FetchAddressQueryVariables = Exact<{
|
||||||
latlng: Scalars['String']['input']
|
latlng: Scalars['String']['input']
|
||||||
}>
|
}>
|
||||||
|
|
||||||
|
|
||||||
export type FetchAddressQuery = { __typename?: 'Query'; address: string }
|
export type FetchAddressQuery = { __typename?: 'Query'; address: string }
|
||||||
|
|
||||||
export type FetchFiltersQueryVariables = Exact<{ [key: string]: never }>
|
export type FetchFiltersQueryVariables = Exact<{ [key: string]: never }>
|
||||||
|
|
||||||
|
|
||||||
export type FetchFiltersQuery = { __typename?: 'Query'; bands: Array<string>; cities: Array<string>; states: Array<string>; danceHalls: Array<string>; municipalities: Array<string> }
|
export type FetchFiltersQuery = { __typename?: 'Query'; bands: Array<string>; cities: Array<string>; states: Array<string>; danceHalls: Array<string>; municipalities: Array<string> }
|
||||||
|
|
||||||
export type FindEventsQueryVariables = Exact<{
|
export type FindEventsQueryVariables = Exact<{
|
||||||
@@ -218,12 +236,15 @@ export type FindEventsQueryVariables = Exact<{
|
|||||||
includeHidden?: InputMaybe<Scalars['Boolean']['input']>
|
includeHidden?: InputMaybe<Scalars['Boolean']['input']>
|
||||||
}>
|
}>
|
||||||
|
|
||||||
export type FindEventsQuery = { __typename?: 'Query'; origins: Array<string>; events: Array<{ __typename?: 'Event'; date: string; time: string | null | undefined; extraInfo: string | null | undefined; band: { __typename?: 'Band'; name: string } | null | undefined; danceHall: { __typename?: 'DanceHall'; name: string | null | undefined; city: string | null | undefined; municipality: string | null | undefined; state: string | null | undefined } | null | undefined; distances: Array<{ __typename?: 'DanceHallDistance'; origin: string; distance: number; duration: string }> }> }
|
|
||||||
|
export type FindEventsQuery = { __typename?: 'Query'; origins?: Array<string>; events: Array<{ __typename?: 'Event'; date: string; time: string | null | undefined; extraInfo: string | null | undefined; band: { __typename?: 'Band'; name: string } | null | undefined; danceHall: { __typename?: 'DanceHall'; name: string | null | undefined; city: string | null | undefined; municipality: string | null | undefined; state: string | null | undefined } | null | undefined; distances: Array<{ __typename?: 'DanceHallDistance'; origin: string; distance: number; duration: string }> }> }
|
||||||
|
|
||||||
export type FindOriginsQueryVariables = Exact<{ [key: string]: never }>
|
export type FindOriginsQueryVariables = Exact<{ [key: string]: never }>
|
||||||
|
|
||||||
|
|
||||||
export type FindOriginsQuery = { __typename?: 'Query'; origins: Array<string> }
|
export type FindOriginsQuery = { __typename?: 'Query'; origins: Array<string> }
|
||||||
|
|
||||||
|
|
||||||
export const RemoveOriginDocument = gql`
|
export const RemoveOriginDocument = gql`
|
||||||
mutation RemoveOrigin($origin: String!) {
|
mutation RemoveOrigin($origin: String!) {
|
||||||
removed: RemoveOrigin(origin: $origin)
|
removed: RemoveOrigin(origin: $origin)
|
||||||
@@ -558,6 +579,7 @@ export interface PossibleTypesResultData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const result: PossibleTypesResultData = {
|
const result: PossibleTypesResultData = {
|
||||||
possibleTypes: {},
|
'possibleTypes': {},
|
||||||
}
|
}
|
||||||
export default result
|
export default result
|
||||||
|
|
||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
"lint:style": "stylelint \"**/*.{css,scss,sass,html,vue}\" --ignore-path .gitignore",
|
"lint:style": "stylelint \"**/*.{css,scss,sass,html,vue}\" --ignore-path .gitignore",
|
||||||
"lint": "npm run lint:js && npm run lint:style",
|
"lint": "npm run lint:js && npm run lint:style",
|
||||||
"lintfix": "eslint --fix . && npm run lint:style --fix",
|
"lintfix": "eslint --fix . && npm run lint:style --fix",
|
||||||
"codegen": "graphql-codegen && eslint --ext \".ts\" --ignore-path .gitignore graphql/generated/operations.ts --fix"
|
"codegen": "graphql-codegen && eslint graphql/generated/operations.ts --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "20.1.0",
|
"@commitlint/cli": "20.1.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user