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

@khanacademy/graphql-flow

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/graphql-flow - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

6

CHANGELOG.md
# @khanacademy/graphql-flow
## 3.1.2
### Patch Changes
- 09f72b5: Fix handling of input objects with required attributes that have a default value
## 3.1.1

@@ -4,0 +10,0 @@

8

dist/generateVariablesType.js

@@ -30,3 +30,3 @@ "use strict";

return (0, _utils.maybeAddDescriptionComment)(inputObject.description, (0, _utils.objectTypeFromProperties)(inputObject.inputFields.map(vbl => (0, _utils.maybeAddDescriptionComment)(vbl.description, maybeOptionalObjectTypeProperty(vbl.name, inputRefToFlow(ctx, vbl.type))))));
return (0, _utils.maybeAddDescriptionComment)(inputObject.description, (0, _utils.objectTypeFromProperties)(inputObject.inputFields.map(vbl => (0, _utils.maybeAddDescriptionComment)(vbl.description, maybeOptionalObjectTypeProperty(vbl.name, inputRefToFlow(ctx, vbl.type, vbl.defaultValue != null))))));
};

@@ -48,5 +48,7 @@

const inputRefToFlow = (ctx, inputRef) => {
const inputRefToFlow = (ctx, inputRef, hasDefaultValue = false) => {
if (inputRef.kind === "NON_NULL") {
return _inputRefToFlow(ctx, inputRef.ofType);
const result = _inputRefToFlow(ctx, inputRef.ofType);
return hasDefaultValue ? (0, _utils.nullableType)(result) : result;
}

@@ -53,0 +55,0 @@

{
"name": "@khanacademy/graphql-flow",
"version": "3.1.1",
"version": "3.1.2",
"bin": {
"graphql-flow": "./dist/cli/run.js"
},
"jest": {
"testPathIgnorePatterns": [
"dist"
]
},
"scripts": {

@@ -8,0 +13,0 @@ "test": "jest",

@@ -624,2 +624,3 @@ /**

candies: number;
friendly?: boolean | null | undefined;
};

@@ -626,0 +627,0 @@ },

@@ -34,3 +34,3 @@ import generate from "@babel/generator";

vbl.name,
inputRefToFlow(ctx, vbl.type),
inputRefToFlow(ctx, vbl.type, vbl.defaultValue != null),
),

@@ -62,5 +62,7 @@ ),

inputRef: IntrospectionInputTypeRef,
hasDefaultValue = false,
): babelTypes.TSType => {
if (inputRef.kind === "NON_NULL") {
return _inputRefToFlow(ctx, inputRef.ofType);
const result = _inputRefToFlow(ctx, inputRef.ofType);
return hasDefaultValue ? nullableType(result) : result;
}

@@ -67,0 +69,0 @@ const result = _inputRefToFlow(ctx, inputRef);

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