@depup/graphql-tools__delegate 12.0.13-depup.0 → 12.1.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -131,7 +131,7 @@ interface MergedFieldConfig {
131
131
  provides?: SelectionSetNode;
132
132
  override?: OverrideHandler;
133
133
  }
134
- type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema: Subschema<any, any, any, TContext>, selectionSet: SelectionSetNode, key: any | undefined, type: GraphQLOutputType) => any;
134
+ type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema: Subschema<any, any, any, TContext>, selectionSet: SelectionSetNode, key: any | undefined, type: GraphQLOutputType, skipTypeMerging?: boolean) => any;
135
135
  interface StitchingInfo<TContext = Record<string, any>> {
136
136
  subschemaMap: Map<GraphQLSchema | SubschemaConfig<any, any, any, TContext>, Subschema<any, any, any, TContext>>;
137
137
  fieldNodesByType: Record<string, Array<FieldNode>>;
@@ -187,6 +187,8 @@ declare function createRequest({ subgraphName, fragments, rootValue, targetOpera
187
187
  * a) handle aliases for proxied schemas
188
188
  * b) handle errors from proxied schemas
189
189
  * c) handle external to internal enum conversion
190
+ * d) fall back to the field name for plain resolver data merged into
191
+ * external objects, which is keyed by literal field name
190
192
  */
191
193
  declare function defaultMergedResolver(parent: ExternalObject, args: Record<string, any>, context: Record<string, any>, info: GraphQLResolveInfo): any;
192
194
 
@@ -210,7 +212,7 @@ declare function cloneSubschemaConfig(subschemaConfig: SubschemaConfig): Subsche
210
212
 
211
213
  declare function extractUnavailableFieldsFromSelectionSet(schema: GraphQLSchema, fieldType: GraphQLNamedOutputType, fieldSelectionSet: SelectionSetNode, shouldAdd: (fieldType: GraphQLObjectType | GraphQLInterfaceType, selection: FieldNode) => boolean, fragments?: Record<string, FragmentDefinitionNode>): SelectionNode[];
212
214
  declare function extractUnavailableFields(schema: GraphQLSchema, field: GraphQLField<any, any>, fieldNode: FieldNode, shouldAdd: (fieldType: GraphQLObjectType | GraphQLInterfaceType, selection: FieldNode) => boolean, fragments?: Record<string, FragmentDefinitionNode>): SelectionNode[];
213
- declare function subtractSelectionSets(selectionSetA: SelectionSetNode, selectionSetB: SelectionSetNode): SelectionSetNode;
215
+ declare function subtractSelectionSets(selectionSetA: SelectionSetNode, selectionSetB: SelectionSetNode, fragments?: Record<string, FragmentDefinitionNode>): SelectionSetNode;
214
216
 
215
217
  type Deferred<T = unknown> = {
216
218
  promise: Promise<T>;
package/dist/index.d.ts CHANGED
@@ -131,7 +131,7 @@ interface MergedFieldConfig {
131
131
  provides?: SelectionSetNode;
132
132
  override?: OverrideHandler;
133
133
  }
134
- type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema: Subschema<any, any, any, TContext>, selectionSet: SelectionSetNode, key: any | undefined, type: GraphQLOutputType) => any;
134
+ type MergedTypeResolver<TContext = Record<string, any>> = (originalResult: any, context: TContext, info: GraphQLResolveInfo, subschema: Subschema<any, any, any, TContext>, selectionSet: SelectionSetNode, key: any | undefined, type: GraphQLOutputType, skipTypeMerging?: boolean) => any;
135
135
  interface StitchingInfo<TContext = Record<string, any>> {
136
136
  subschemaMap: Map<GraphQLSchema | SubschemaConfig<any, any, any, TContext>, Subschema<any, any, any, TContext>>;
137
137
  fieldNodesByType: Record<string, Array<FieldNode>>;
@@ -187,6 +187,8 @@ declare function createRequest({ subgraphName, fragments, rootValue, targetOpera
187
187
  * a) handle aliases for proxied schemas
188
188
  * b) handle errors from proxied schemas
189
189
  * c) handle external to internal enum conversion
190
+ * d) fall back to the field name for plain resolver data merged into
191
+ * external objects, which is keyed by literal field name
190
192
  */
191
193
  declare function defaultMergedResolver(parent: ExternalObject, args: Record<string, any>, context: Record<string, any>, info: GraphQLResolveInfo): any;
192
194
 
@@ -210,7 +212,7 @@ declare function cloneSubschemaConfig(subschemaConfig: SubschemaConfig): Subsche
210
212
 
211
213
  declare function extractUnavailableFieldsFromSelectionSet(schema: GraphQLSchema, fieldType: GraphQLNamedOutputType, fieldSelectionSet: SelectionSetNode, shouldAdd: (fieldType: GraphQLObjectType | GraphQLInterfaceType, selection: FieldNode) => boolean, fragments?: Record<string, FragmentDefinitionNode>): SelectionNode[];
212
214
  declare function extractUnavailableFields(schema: GraphQLSchema, field: GraphQLField<any, any>, fieldNode: FieldNode, shouldAdd: (fieldType: GraphQLObjectType | GraphQLInterfaceType, selection: FieldNode) => boolean, fragments?: Record<string, FragmentDefinitionNode>): SelectionNode[];
213
- declare function subtractSelectionSets(selectionSetA: SelectionSetNode, selectionSetB: SelectionSetNode): SelectionSetNode;
215
+ declare function subtractSelectionSets(selectionSetA: SelectionSetNode, selectionSetB: SelectionSetNode, fragments?: Record<string, FragmentDefinitionNode>): SelectionSetNode;
214
216
 
215
217
  type Deferred<T = unknown> = {
216
218
  promise: Promise<T>;