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

@magidoc/plugin-reverse-schema-mapper

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magidoc/plugin-reverse-schema-mapper - npm Package Compare versions

Comparing version 2.5.2 to 2.6.0

7

build/createReverseMapping.js

@@ -22,3 +22,4 @@ import { isObjectType, isUnionType, isNonNullType, isListType } from 'graphql';

kind: ReferenceKind.ARGUMENT,
parent: field,
field: field,
type: type,
by: argument,

@@ -43,3 +44,5 @@ });

Object.entries(schema.getTypeMap()).forEach(([, type]) => {
callback(type);
if (!type.name.startsWith('__')) {
callback(type);
}
});

@@ -46,0 +49,0 @@ }

@@ -1,2 +0,2 @@

import { GraphQLArgument, GraphQLField, GraphQLObjectType, GraphQLUnionType } from 'graphql';
import { GraphQLArgument, GraphQLField, GraphQLNamedType, GraphQLObjectType, GraphQLUnionType } from 'graphql';
export declare type TypeReverseMapping = {

@@ -39,6 +39,10 @@ /**

/**
* The parent field that uses this argument.
* The field that uses this argument.
*/
parent: GraphQLField<unknown, unknown, unknown>;
field: GraphQLField<unknown, unknown, unknown>;
/**
* The type that has the field that uses this argument.
*/
type: GraphQLNamedType;
/**
* The argument that references this type.

@@ -45,0 +49,0 @@ */

@@ -5,3 +5,3 @@ {

"private": false,
"version": "2.5.2",
"version": "2.6.0",
"type": "module",

@@ -27,12 +27,13 @@ "license": "MIT",

"devDependencies": {
"@types/jest": "^28.1.5",
"@types/node": "^18.0.3",
"@jest/types": "^28.1.3",
"@types/jest": "^28.1.6",
"@types/node": "^18.0.6",
"jest": "^28.1.3",
"jest-extended": "^3.0.1",
"rollup": "^2.76.0",
"ts-jest": "^28.0.5",
"rollup": "^2.77.0",
"ts-jest": "^28.0.7",
"typescript": "^4.7.4"
},
"peerDependencies": {
"graphql": "^16.3.0"
"graphql": "^16.5.0"
},

@@ -39,0 +40,0 @@ "scripts": {

@@ -37,3 +37,4 @@ import {

kind: ReferenceKind.ARGUMENT,
parent: field,
field: field,
type: type,
by: argument,

@@ -64,3 +65,5 @@ })

Object.entries(schema.getTypeMap()).forEach(([, type]) => {
callback(type)
if (!type.name.startsWith('__')) {
callback(type)
}
})

@@ -67,0 +70,0 @@ }

import {
GraphQLArgument,
GraphQLField,
GraphQLNamedType,
GraphQLObjectType,

@@ -49,6 +50,10 @@ GraphQLUnionType,

/**
* The parent field that uses this argument.
* The field that uses this argument.
*/
parent: GraphQLField<unknown, unknown, unknown>
field: GraphQLField<unknown, unknown, unknown>
/**
* The type that has the field that uses this argument.
*/
type: GraphQLNamedType
/**
* The argument that references this type.

@@ -55,0 +60,0 @@ */

@@ -11,7 +11,7 @@ import { GraphQLNamedType, GraphQLObjectType } from 'graphql'

expect(reverse.getFor(getMandatoryType('String'))?.references).toHaveLength(
33,
17,
)
expect(
reverse.getFor(getMandatoryType('Boolean'))?.references,
).toHaveLength(12)
).toHaveLength(3)
})

@@ -46,3 +46,4 @@

by: targetField.args.find((arg) => arg.name === 'nonStandardScalar'),
parent: targetField,
field: targetField,
type: schema.getQueryType(),
})

@@ -63,2 +64,6 @@ })

})
it('should not generate meta type references', () => {
expect(reverse.getFor(getMandatoryType('__Type'))).toBeUndefined()
})
})

@@ -65,0 +70,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