@graphql-codegen/plugin-helpers
Advanced tools
Comparing version 5.1.0 to 5.1.1-alpha-20241210130701-70a8f367ec2e1cb6cfe466c92be5f0497c2b857b
@@ -128,3 +128,3 @@ "use strict"; | ||
*/ | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, }) { | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, federationTypeSignature, }) { | ||
if (this.enabled && | ||
@@ -142,7 +142,7 @@ (0, graphql_1.isObjectType)(parentType) && | ||
const requires = getDirectivesByName('requires', fieldNode).map(this.extractFieldSet); | ||
const requiredFields = this.translateFieldSet((0, merge_js_1.default)({}, ...requires), parentTypeSignature); | ||
const requiredFields = this.translateFieldSet((0, merge_js_1.default)({}, ...requires), federationTypeSignature); | ||
// @key() @key() - "primary keys" in Federation | ||
const primaryKeys = resolvableKeyDirectives.map(def => { | ||
const fields = this.extractFieldSet(def); | ||
return this.translateFieldSet(fields, parentTypeSignature); | ||
return this.translateFieldSet(fields, federationTypeSignature); | ||
}); | ||
@@ -149,0 +149,0 @@ const [open, close] = primaryKeys.length > 1 ? ['(', ')'] : ['', '']; |
@@ -121,3 +121,3 @@ import { astFromObjectType, getRootTypeNames, MapperKind, mapSchema } from '@graphql-tools/utils'; | ||
*/ | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, }) { | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, federationTypeSignature, }) { | ||
if (this.enabled && | ||
@@ -135,7 +135,7 @@ isObjectType(parentType) && | ||
const requires = getDirectivesByName('requires', fieldNode).map(this.extractFieldSet); | ||
const requiredFields = this.translateFieldSet(merge({}, ...requires), parentTypeSignature); | ||
const requiredFields = this.translateFieldSet(merge({}, ...requires), federationTypeSignature); | ||
// @key() @key() - "primary keys" in Federation | ||
const primaryKeys = resolvableKeyDirectives.map(def => { | ||
const fields = this.extractFieldSet(def); | ||
return this.translateFieldSet(fields, parentTypeSignature); | ||
return this.translateFieldSet(fields, federationTypeSignature); | ||
}); | ||
@@ -142,0 +142,0 @@ const [open, close] = primaryKeys.length > 1 ? ['(', ')'] : ['', '']; |
{ | ||
"name": "@graphql-codegen/plugin-helpers", | ||
"version": "5.1.0", | ||
"version": "5.1.1-alpha-20241210130701-70a8f367ec2e1cb6cfe466c92be5f0497c2b857b", | ||
"description": "GraphQL Code Generator common utils and types", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
@@ -64,6 +64,7 @@ import { DirectiveNode, FieldDefinitionNode, GraphQLNamedType, GraphQLObjectType, GraphQLSchema, ObjectTypeDefinitionNode } from 'graphql'; | ||
*/ | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, }: { | ||
transformParentType({ fieldNode, parentType, parentTypeSignature, federationTypeSignature, }: { | ||
fieldNode: FieldDefinitionNode; | ||
parentType: GraphQLNamedType; | ||
parentTypeSignature: string; | ||
federationTypeSignature: string; | ||
}): string; | ||
@@ -70,0 +71,0 @@ setMeta(typename: string, update: Partial<TypeMeta>): void; |
@@ -285,3 +285,3 @@ import type { ApolloEngineOptions } from '@graphql-tools/apollo-engine-loader'; | ||
/** | ||
* @description Configuration object containing key => value that will be passes to the plugins. | ||
* @description Configuration object containing key => value that will be passed to the plugins. | ||
* Specifying configuration in this level of your configuration file will pass it to all plugins, in all outputs. | ||
@@ -390,3 +390,3 @@ * | ||
* @additionalProperties true | ||
* @description Configuration object containing key => value that will be passes to the plugins. | ||
* @description Configuration object containing key => value that will be passed to the plugins. | ||
* Specifying configuration in this level of your configuration file will pass it to all plugins, in all outputs. | ||
@@ -393,0 +393,0 @@ * |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116484
1928
2