Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-codegen/plugin-helpers

Package Overview
Dependencies
Maintainers
4
Versions
5515
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-codegen/plugin-helpers - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1-alpha-20241210130701-70a8f367ec2e1cb6cfe466c92be5f0497c2b857b

6

cjs/federation.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc