Skip to content

Commit 59dd160

Browse files
committed
Remove deprecated APIs
1 parent 5c66faf commit 59dd160

File tree

13 files changed

+4
-397
lines changed

13 files changed

+4
-397
lines changed

.changeset/afraid-geckos-bow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@graphql-ts/schema": major
33
---
44

5-
The following types are now deprecated and have replacements as follows:
5+
The following types have been replaced as follows:
66

77
- `ObjectType` -> `GObjectType`
88
- `EnumType` -> `GEnumType`

.changeset/purple-beers-mate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@graphql-ts/schema": major
33
---
44

5-
The `g` export exported from `@graphql-ts/schema` directly is now deprecated. Using `gWithContext` is now the recommended way to use `@graphql-ts/schema` instead of the instance of `g` exported by `@graphql-ts/schema` or creating multiple files to setup `g` though using those is still possible.
5+
The `g` and `graphql` exports from `@graphql-ts/schema` have been removed. You should now use `gWithContext` to bind `g` to a specific context type.
66

77
```ts
88
import { GraphQLSchema } from "graphql";

packages/schema/src/api-with-context/api-with-context.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/schema/src/api-with-context/api-with-context.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/schema/src/api-with-context/index.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/schema/src/api-without-context/api-without-context.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/schema/src/api-without-context/api-without-context.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/schema/src/api-without-context/index.ts

Lines changed: 0 additions & 84 deletions
This file was deleted.

packages/schema/src/index.ts

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -123,76 +123,3 @@ export {
123123
type InferValueFromArgs,
124124
type InferValueFromInputType,
125125
} from "./types";
126-
export { g } from "./schema-api";
127-
128-
export type {
129-
Arg,
130-
EnumType,
131-
InputObjectType,
132-
InputType,
133-
NullableInputType,
134-
ListType,
135-
NonNullType,
136-
ScalarType,
137-
} from "./api-without-context";
138-
139-
import type {
140-
GArg,
141-
GField,
142-
GFieldResolver,
143-
GInputType,
144-
GInterfaceField,
145-
GInterfaceType,
146-
GNullableOutputType,
147-
GNullableType,
148-
GObjectType,
149-
GOutputType,
150-
GType,
151-
GUnionType,
152-
} from "./types";
153-
154-
/** @deprecated Use {@link GField} instead */
155-
export type Field<
156-
Source,
157-
Args extends { [Key in keyof Args]: GArg<GInputType> },
158-
Type extends GOutputType<Context>,
159-
SourceAtKey,
160-
Context,
161-
> = GField<Source, Args, Type, SourceAtKey, Context>;
162-
/** @deprecated Use {@link GFieldResolver} instead */
163-
export type FieldResolver<
164-
Source,
165-
Args extends Record<string, GArg<GInputType>>,
166-
Type extends GOutputType<Context>,
167-
Context,
168-
> = GFieldResolver<Source, Args, Type, Context>;
169-
170-
/** @deprecated Use {@link GInterfaceField} instead */
171-
export type InterfaceField<
172-
Args extends Record<string, GArg<GInputType>>,
173-
Type extends GOutputType<Context>,
174-
Context,
175-
> = GInterfaceField<Args, Type, Context>;
176-
/** @deprecated Use {@link GInterfaceType} instead */
177-
export type InterfaceType<
178-
Source,
179-
Fields extends Record<
180-
string,
181-
GInterfaceField<any, GOutputType<Context>, Context>
182-
>,
183-
Context,
184-
> = GInterfaceType<Source, Fields, Context>;
185-
/** @deprecated Use {@link GNullableOutputType} instead */
186-
export type NullableOutputType<Context> = GNullableOutputType<Context>;
187-
/** @deprecated Use {@link GObjectType} instead */
188-
export type ObjectType<Source, Context> = GObjectType<Source, Context>;
189-
/** @deprecated Use {@link GOutputType} instead */
190-
export type OutputType<Context> = GOutputType<Context>;
191-
/** @deprecated Use {@link GUnionType} instead */
192-
export type UnionType<Source, Context> = GUnionType<Source, Context>;
193-
/** @deprecated Use {@link GType} instead */
194-
export type Type<Context> = GType<Context>;
195-
/** @deprecated Use {@link GNullableType} instead */
196-
export type NullableType<Context> = GNullableType<Context>;
197-
198-
export * from "./schema-api-alias";

packages/schema/src/output.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import type {
77
GraphQLInputFieldConfig,
88
GraphQLScalarTypeConfig,
99
} from "graphql";
10-
import type {
11-
InferValueFromArgs,
12-
InferValueFromInputType,
13-
} from "./api-without-context";
1410
import {
1511
GArg,
1612
GEnumType,
@@ -33,6 +29,8 @@ import {
3329
GType,
3430
GUnionType,
3531
InferValueFromOutputType,
32+
InferValueFromArgs,
33+
InferValueFromInputType,
3634
} from "./types";
3735
import {
3836
GraphQLBoolean,

0 commit comments

Comments
 (0)