relation
Library supporting relatedTypeSection
for displaying relations between GraphQL schema entities.
Seeβ
getRelationOfField()β
function getRelationOfField(type, schemaMap): Partial<Record<SchemaEntity, RelationOfField[]>>
Returns a map of fields and arguments where the GraphQL schema type matches the type.
Parametersβ
β’ type: unknown
the GraphQL schema type being processed.
β’ schemaMap: Maybe
<SchemaMap
>
a GraphQL schema map (see introspection!getSchemaMap).
Returnsβ
Partial
<Record
<SchemaEntity
, RelationOfField
[]>>
a record map of fields and arguments relations.
Seeβ
mapRelationOf
Defined inβ
packages/graphql/src/relation.ts:165
getRelationOfImplementation()β
function getRelationOfImplementation(type, schemaMap): Partial<Record<SchemaEntity, RelationOfImplementation[]>>
Returns a map of types (unions or interfaces) where the GraphQL schema type is implemented.
Parametersβ
β’ type: unknown
the GraphQL schema type being processed.
β’ schemaMap: Maybe
<SchemaMap
>
a GraphQL schema map (see introspection!getSchemaMap).
Returnsβ
Partial
<Record
<SchemaEntity
, RelationOfImplementation
[]>>
a record map of unions or interfaces relations.
Seeβ
mapRelationOf
Defined inβ
packages/graphql/src/relation.ts:351
getRelationOfInterface()β
function getRelationOfInterface(type, schemaMap): Partial<Record<SchemaEntity, RelationOfInterface[]>>
Returns a map of interfaces where the GraphQL schema type is extended.
Parametersβ
β’ type: unknown
the GraphQL schema type being processed.
β’ schemaMap: Maybe
<SchemaMap
>
a GraphQL schema map (see introspection!getSchemaMap).
Returnsβ
Partial
<Record
<SchemaEntity
, RelationOfInterface
[]>>
a record map of interfaces relations.
Seeβ
mapRelationOf
Defined inβ
packages/graphql/src/relation.ts:294
getRelationOfReturn()β
function getRelationOfReturn(type, schemaMap): Partial<Record<SchemaEntity, GraphQLOperationType[]>>
Returns a map of operations (queries, mutations, subscriptions) where the GraphQL schema type is the return type.
Parametersβ
β’ type: unknown
the GraphQL schema type being processed.
β’ schemaMap: Maybe
<SchemaMap
>
a GraphQL schema map (see introspection!getSchemaMap).
Returnsβ
Partial
<Record
<SchemaEntity
, GraphQLOperationType
[]>>
a record map of operations relations.
Seeβ
mapRelationOf
Defined inβ
packages/graphql/src/relation.ts:104
getRelationOfUnion()β
function getRelationOfUnion(type, schemaMap): Partial<Record<SchemaEntity, GraphQLUnionType[]>>
Returns a map of unions where the GraphQL schema type is part of it.
Parametersβ
β’ type: unknown
the GraphQL schema type being processed.
β’ schemaMap: Maybe
<SchemaMap
>
a GraphQL schema map (see introspection!getSchemaMap).
Returnsβ
Partial
<Record
<SchemaEntity
, GraphQLUnionType
[]>>
a record map of unions relations.
Seeβ
mapRelationOf
Defined inβ
packages/graphql/src/relation.ts:238