netlify-onegraph-internal
Advanced tools
Comparing version 0.2.1 to 0.2.2
import { DocumentNode, FragmentDefinitionNode, GraphQLSchema, OperationDefinitionNode, OperationTypeNode } from "graphql"; | ||
import { ExportedFile, FrameworkGenerator } from "./codegen/codegenHelpers"; | ||
export declare type EnabledService = { | ||
enabled: boolean; | ||
}; | ||
export declare type NetlifyGraphJson = { | ||
enabledServices: EnabledService[]; | ||
schema?: string; | ||
}; | ||
export declare type State = { | ||
@@ -57,2 +50,3 @@ set: (key: string, value?: any) => any; | ||
fragmentName: string; | ||
typeCondition: string; | ||
description: string; | ||
@@ -59,0 +53,0 @@ kind: "fragment"; |
@@ -268,3 +268,4 @@ "use strict"; | ||
var operationWithoutNetlifyDirective = __assign(__assign({}, operation), { directives: (operation.directives || []).filter(function (directive) { return directive.name.value !== exports.NETLIFY_DIRECTIVE_NAME; }) }); | ||
var fn = __assign(__assign({}, basicFn), { safeBody: safeBody, kind: "fragment", returnSignature: returnSignature, fragmentName: operationName, parsedOperation: operation, operationStringWithoutNetlifyDirective: (0, graphql_1.print)(operationWithoutNetlifyDirective) }); | ||
var typeCondition = operation.typeCondition.name.value; | ||
var fn = __assign(__assign({}, basicFn), { safeBody: safeBody, kind: "fragment", returnSignature: returnSignature, fragmentName: operationName, typeCondition: typeCondition, parsedOperation: operation, operationStringWithoutNetlifyDirective: (0, graphql_1.print)(operationWithoutNetlifyDirective) }); | ||
return fn; | ||
@@ -682,3 +683,3 @@ }; | ||
parsedDoc.definitions.forEach(function (next) { | ||
var _a, _b; | ||
var _a; | ||
if (next.kind !== graphql_1.Kind.OPERATION_DEFINITION && | ||
@@ -700,6 +701,7 @@ next.kind !== graphql_1.Kind.FRAGMENT_DEFINITION) { | ||
if (next.kind === graphql_1.Kind.FRAGMENT_DEFINITION) { | ||
(_b = next.name) === null || _b === void 0 ? void 0 : _b.value; | ||
var typeCondition = next.typeCondition.name.value; | ||
var operation = { | ||
id: netlifyDirective.id, | ||
fragmentName: key, | ||
typeCondition: typeCondition, | ||
description: netlifyDirective.description, | ||
@@ -706,0 +708,0 @@ parsedOperation: next, |
{ | ||
"name": "netlify-onegraph-internal", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Internal tools for use by Netlify", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
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
472910
6136