@@ -29,18 +29,7 @@ import {
2929 type FieldDefinitionNode ,
3030 type InputValueDefinitionNode ,
3131} from "graphql" ;
32- import type {
33- field ,
34- union ,
35- interface as interface_ ,
36- object ,
37- } from "./api-with-context" ;
38- import type {
39- scalar ,
40- enum as enum_ ,
41- inputObject ,
42- arg ,
43- } from "./api-without-context" ;
32+ import type { g } from "./g-for-doc-references" ;
4433
4534type Maybe < T > = T | null | undefined ;
4635
@@ -173,7 +162,7 @@ export type InferValueFromInputType<Type extends GInputType> =
173162
174163/**
175164 * A GraphQL output field for an {@link GObjectType object type} which should be
176- * created using {@link field ` g.field` }.
165+ * created using {@link g.field}.
177166 */
178167export type GField <
179168 Source ,
@@ -194,7 +183,7 @@ export type GField<
194183
195184/**
196185 * A GraphQL object type. This should generally be constructed with
197- * {@link object ` g.object` }.
186+ * {@link g.object}.
198187 *
199188 * Note this is an **output** type, if you want an input object, use
200189 * {@link GInputObjectType}.
@@ -230,7 +219,7 @@ export type GObjectTypeConfig<
230219
231220/**
232221 * A GraphQL union type. This should generally be constructed with
233- * {@link union ` g.union` }.
222+ * {@link g.union}.
234223 *
235224 * A union type represents an object that could be one of a list of types. Note
236225 * it is similar to an {@link GInterfaceType} except that a union doesn't imply
@@ -285,7 +274,7 @@ export type GInterfaceField<
285274/**
286275 * A GraphQL interface type that can be implemented by other
287276 * {@link GObjectType GraphQL object} and interface types. This should generally
288- * be constructed with {@link interface_ ` g.interface` }.
277+ * be constructed with {@link g.interface}.
289278 *
290279 * If you use the `GInterfaceType` constructor directly, all fields will need
291280 * explicit resolvers so you should use `g.interface` instead.
@@ -330,7 +319,7 @@ export type GInterfaceTypeConfig<
330319> ;
331320
332321/**
333- * A GraphQL argument. These should be created with {@link arg ` g.arg` }
322+ * A GraphQL argument. These should be created with {@link g.arg}
334323 *
335324 * Args can can be used as arguments on output fields:
336325 *
@@ -388,7 +377,10 @@ export type GArg<
388377 HasDefaultValue extends boolean = boolean ,
389378> = {
390379 type : Type ;
391- defaultValue : HasDefaultValue extends true ? { } | null : undefined ;
380+ defaultValue : {
381+ true : { } | null ;
382+ false : undefined ;
383+ } [ `${HasDefaultValue } `] ;
392384 description ?: Maybe < string > ;
393385 deprecationReason ?: Maybe < string > ;
394386 extensions ?: Maybe < GraphQLInputFieldExtensions & GraphQLArgumentExtensions > ;
@@ -412,7 +404,7 @@ export type GInputObjectTypeConfig<
412404
413405/**
414406 * A GraphQL input object type. This should generally be constructed with
415- * {@link inputObject ` g.inputObject` }.
407+ * {@link g.inputObject}.
416408 *
417409 * Unlike some other constructors in this module, this constructor functions
418410 * exactly the same as it's counterpart `g.inputObject` so it is safe to use
@@ -450,8 +442,7 @@ export type GEnumTypeConfig<Values extends { [key: string]: unknown }> =
450442 > ;
451443
452444/**
453- * A GraphQL enum type. This should generally be constructed with
454- * {@link enum_ `g.enum`}.
445+ * A GraphQL enum type. This should generally be constructed with {@link g.enum}.
455446 *
456447 * Unlike some other constructors in this module, this constructor functions
457448 * exactly the same as it's counterpart `g.enum` so it is safe to use directly
@@ -470,7 +461,7 @@ export class GEnumType<
470461
471462/**
472463 * A GraphQL enum type. This should generally be constructed with
473- * {@link scalar ` g.scalar` }.
464+ * {@link g.scalar}.
474465 *
475466 * Unlike some other constructors in this module, this constructor functions
476467 * exactly the same as it's counterpart `g.scalar` so it is safe to use directly
@@ -491,7 +482,7 @@ type Flatten<T> = {
491482
492483/**
493484 * A GraphQL non-null type. This should generally be constructed with
494- * {@link enum_ ` g.nonNull` }.
485+ * {@link g.nonNull}.
495486 *
496487 * Unlike some other constructors in this module, this constructor functions
497488 * exactly the same as it's counterpart `g.nonNull` so it is safe to use
@@ -528,8 +519,7 @@ export class GNonNull<
528519}
529520
530521/**
531- * A GraphQL list type. This should generally be constructed with
532- * {@link list `g.list`}.
522+ * A GraphQL list type. This should generally be constructed with {@link g.list}.
533523 *
534524 * Unlike some other constructors in this module, this constructor functions
535525 * exactly the same as it's counterpart `g.list` so it is safe to use directly
0 commit comments