Skip to content

Commit

Permalink
Don’t use types not available in graphql 15
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Sep 13, 2023
1 parent 7424204 commit eb9027e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { getRootTypeNames } from '@graphql-tools/utils';
import autoBind from 'auto-bind';
import {
ASTNode,
ConstObjectValueNode,
ConstValueNode,
ObjectValueNode,
ValueNode,
DirectiveDefinitionNode,
EnumTypeDefinitionNode,
FieldDefinitionNode,
Expand Down Expand Up @@ -54,7 +54,7 @@ import {
import { OperationVariablesToObject } from './variables-to-object.js';

// converts an ObjectValueNode to the JS object it represents
const objectNodeToObject = (objectNode: ConstObjectValueNode) => {
const objectNodeToObject = (objectNode: ObjectValueNode) => {
const { fields } = objectNode;
return fields.reduce((acc, field) => {
// for some reason this does not seem to match the type
Expand All @@ -67,7 +67,7 @@ const objectNodeToObject = (objectNode: ConstObjectValueNode) => {
};

// converts an ValueNode to the JS value it represents
const valueNodeToValue = (value: ConstValueNode): unknown => {
const valueNodeToValue = (value: ValueNode): unknown => {
if (value.kind === 'StringValue') {
return value.value;
}
Expand Down

0 comments on commit eb9027e

Please sign in to comment.