Skip to content

Commit 3572f25

Browse files
committed
fix find replace
1 parent ed6c96b commit 3572f25

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

packages/core/src/types/schema/graphql-ts-schema.ts

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable @typescript-eslint/no-empty-object-type */
22
import type { ReadStream } from 'node:fs'
3-
import * as graphqlTsSchema from '@graphql-ts/schema'
3+
import * as tsgql from '@graphql-ts/schema'
44
// @ts-expect-error
55
import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
66
import type { GraphQLFieldExtensions, GraphQLResolveInfo } from 'graphql'
@@ -48,7 +48,7 @@ export { fields, interface, interfaceField, object, union } from './schema-api-w
4848
type SomeTypeThatIsntARecordOfArgs = string
4949
export type FieldFuncResolve<
5050
Source,
51-
Args extends { [Key in keyof Args]: graphqlTsSchema.Arg<graphqlTsSchema.InputType> },
51+
Args extends { [Key in keyof Args]: tsgql.Arg<tsgql.InputType> },
5252
Type extends OutputType,
5353
Key extends string,
5454
Context extends KeystoneContext<any>
@@ -65,30 +65,30 @@ export type FieldFuncResolve<
6565
// });
6666
[Key] extends [keyof Source]
6767
? Source[Key] extends
68-
| graphqlTsSchema.InferValueFromOutputType<Type>
68+
| tsgql.InferValueFromOutputType<Type>
6969
| ((
70-
args: graphqlTsSchema.InferValueFromArgs<Args>,
70+
args: tsgql.InferValueFromArgs<Args>,
7171
context: Context,
7272
info: GraphQLResolveInfo
73-
) => graphqlTsSchema.InferValueFromOutputType<Type>)
73+
) => tsgql.InferValueFromOutputType<Type>)
7474
? {
75-
resolve?: graphqlTsSchema.FieldResolver<
75+
resolve?: tsgql.FieldResolver<
7676
Source,
7777
SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args,
7878
Type,
7979
Context
8080
>
8181
}
8282
: {
83-
resolve: graphqlTsSchema.FieldResolver<
83+
resolve: tsgql.FieldResolver<
8484
Source,
8585
SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args,
8686
Type,
8787
Context
8888
>
8989
}
9090
: {
91-
resolve: graphqlTsSchema.FieldResolver<
91+
resolve: tsgql.FieldResolver<
9292
Source,
9393
SomeTypeThatIsntARecordOfArgs extends Args ? {} : Args,
9494
Type,
@@ -98,7 +98,7 @@ export type FieldFuncResolve<
9898

9999
type FieldFuncArgs<
100100
Source,
101-
Args extends { [Key in keyof Args]: graphqlTsSchema.Arg<graphqlTsSchema.InputType> },
101+
Args extends { [Key in keyof Args]: tsgql.Arg<tsgql.InputType> },
102102
Type extends OutputType,
103103
Key extends string,
104104
Context extends KeystoneContext
@@ -115,15 +115,15 @@ type FieldFunc = <
115115
Type extends OutputType,
116116
Key extends string,
117117
Context extends KeystoneContext<any>,
118-
Args extends { [Key in keyof Args]: graphqlTsSchema.Arg<graphqlTsSchema.InputType> } = object
118+
Args extends { [Key in keyof Args]: tsgql.Arg<tsgql.InputType> } = object
119119
>(
120120
field: FieldFuncArgs<Source, Args, Type, Key, Context>
121-
) => graphqlTsSchema.Field<Source, Args, Type, Key, Context>
121+
) => tsgql.Field<Source, Args, Type, Key, Context>
122122

123123
export const field = fieldd as FieldFunc
124124
// TODO: remove when we use { graphql } from '.keystone'
125125

126-
export const JSON = graphqlTsSchema.g.scalar<JSONValue>(
126+
export const JSON = tsgql.graphql.scalar<JSONValue>(
127127
new GraphQLScalarType({
128128
name: 'JSON',
129129
description:
@@ -140,13 +140,13 @@ type FileUpload = {
140140
createReadStream(): ReadStream
141141
}
142142

143-
export const Upload = graphqlTsSchema.g.scalar<Promise<FileUpload>>(GraphQLUpload)
143+
export const Upload = tsgql.graphql.scalar<Promise<FileUpload>>(GraphQLUpload)
144144

145145
// - Decimal.js throws on invalid inputs
146146
// - Decimal.js can represent +Infinity and -Infinity, these aren't values in Postgres' decimal,
147147
// NaN is but Prisma doesn't support it
148148
// .isFinite refers to +Infinity, -Infinity and NaN
149-
export const Decimal = graphqlTsSchema.graphql.scalar<DecimalValue & { scaleToPrint?: number }>(
149+
export const Decimal = tsgql.graphql.scalar<DecimalValue & { scaleToPrint?: number }>(
150150
new GraphQLScalarType({
151151
name: 'Decimal',
152152
serialize (value) {
@@ -174,7 +174,7 @@ export const Decimal = graphqlTsSchema.graphql.scalar<DecimalValue & { scaleToPr
174174
})
175175
)
176176

177-
export const BigInt = graphqlTsSchema.graphql.scalar<bigint>(
177+
export const BigInt = tsgql.graphql.scalar<bigint>(
178178
new GraphQLScalarType({
179179
name: 'BigInt',
180180
serialize (value) {
@@ -209,7 +209,7 @@ function parseDate (input: string): Date {
209209
return parsed
210210
}
211211

212-
export const DateTime = graphqlTsSchema.g.scalar<Date>(
212+
export const DateTime = tsgql.graphql.scalar<Date>(
213213
new GraphQLScalarType({
214214
name: 'DateTime',
215215
specifiedByURL: 'https://datatracker.ietf.org/doc/html/rfc3339#section-5.6',
@@ -243,7 +243,7 @@ function validateCalendarDay (input: string) {
243243
}
244244
}
245245

246-
export const CalendarDay = graphqlTsSchema.g.scalar<string>(
246+
export const CalendarDay = tsgql.graphql.scalar<string>(
247247
new GraphQLScalarType({
248248
name: 'CalendarDay',
249249
specifiedByURL: 'https://datatracker.ietf.org/doc/html/rfc3339#section-5.6',
@@ -270,7 +270,7 @@ export const CalendarDay = graphqlTsSchema.g.scalar<string>(
270270
})
271271
)
272272

273-
export const Empty = graphqlTsSchema.g.scalar(
273+
export const Empty = tsgql.graphql.scalar(
274274
new GraphQLScalarType({
275275
name: 'Empty',
276276
serialize (value) { return null },
@@ -280,40 +280,40 @@ export const Empty = graphqlTsSchema.g.scalar(
280280
)
281281

282282
export type NullableType<Context extends KeystoneContext = KeystoneContext> =
283-
graphqlTsSchema.NullableType<Context>
284-
export type Type<Context extends KeystoneContext = KeystoneContext> = graphqlTsSchema.Type<Context>
283+
tsgql.NullableType<Context>
284+
export type Type<Context extends KeystoneContext = KeystoneContext> = tsgql.Type<Context>
285285
export type NullableOutputType<Context extends KeystoneContext = KeystoneContext> =
286-
graphqlTsSchema.NullableOutputType<Context>
286+
tsgql.NullableOutputType<Context>
287287
export type OutputType<Context extends KeystoneContext = KeystoneContext> =
288-
graphqlTsSchema.OutputType<Context>
288+
tsgql.OutputType<Context>
289289
export type Field<
290290
Source,
291-
Args extends Record<string, graphqlTsSchema.Arg<any>>,
291+
Args extends Record<string, tsgql.Arg<any>>,
292292
TType extends OutputType<Context>,
293293
Key extends string,
294294
Context extends KeystoneContext = KeystoneContext
295-
> = graphqlTsSchema.Field<Source, Args, TType, Key, Context>
295+
> = tsgql.Field<Source, Args, TType, Key, Context>
296296
export type FieldResolver<
297297
Source,
298-
Args extends Record<string, graphqlTsSchema.Arg<any>>,
298+
Args extends Record<string, tsgql.Arg<any>>,
299299
TType extends OutputType<Context>,
300300
Context extends KeystoneContext = KeystoneContext
301-
> = graphqlTsSchema.FieldResolver<Source, Args, TType, Context>
301+
> = tsgql.FieldResolver<Source, Args, TType, Context>
302302
export type ObjectType<
303303
Source,
304304
Context extends KeystoneContext = KeystoneContext
305-
> = graphqlTsSchema.ObjectType<Source, Context>
305+
> = tsgql.ObjectType<Source, Context>
306306
export type UnionType<
307307
Source,
308308
Context extends KeystoneContext = KeystoneContext
309-
> = graphqlTsSchema.UnionType<Source, Context>
309+
> = tsgql.UnionType<Source, Context>
310310
export type InterfaceType<
311311
Source,
312-
Fields extends Record<string, graphqlTsSchema.InterfaceField<any, OutputType<Context>, Context>>,
312+
Fields extends Record<string, tsgql.InterfaceField<any, OutputType<Context>, Context>>,
313313
Context extends KeystoneContext = KeystoneContext
314-
> = graphqlTsSchema.InterfaceType<Source, Fields, Context>
314+
> = tsgql.InterfaceType<Source, Fields, Context>
315315
export type InterfaceField<
316-
Args extends Record<string, graphqlTsSchema.Arg<any>>,
316+
Args extends Record<string, tsgql.Arg<any>>,
317317
TType extends OutputType<Context>,
318318
Context extends KeystoneContext = KeystoneContext
319-
> = graphqlTsSchema.InterfaceField<Args, TType, Context>
319+
> = tsgql.InterfaceField<Args, TType, Context>

0 commit comments

Comments
 (0)