Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.

upgrade graphql.web and fix a few tests (#14)

Changed files
+15 -17
alias
language
+4 -1
alias/language/__tests__/parser.test.js
···
it('parses constant default values', () => {
expect(() => {
-
return parse('query Foo($x: Complex = { a: { b: [ $var ] } }) { field }');
+
return parse('query Foo($x: Complex = { a: { b: [ "test" ] } }) { field }');
}).not.toThrow();
});
···
},
{
kind: Kind.STRING,
+
block: false,
value: 'abc',
},
],
···
kind: Kind.LIST,
values: [
{
+
block: true,
kind: Kind.STRING,
value: 'long',
},
{
kind: Kind.STRING,
+
block: false,
value: 'short',
},
],
+6 -11
alias/language/__tests__/printer.test.js
···
{
id
name
-
}
-
`);
+
}`);
const mutationAST = parse('mutation { id, name }');
expect(print(mutationAST)).toBe(dedent`
mutation {
id
name
-
}
-
`);
+
}`);
const queryASTWithArtifacts = parse('query ($foo: TestType) @testDirective { id, name }');
expect(print(queryASTWithArtifacts)).toBe(dedent`
query ($foo: TestType) @testDirective {
id
name
-
}
-
`);
+
}`);
const mutationASTWithArtifacts = parse('mutation ($foo: TestType) @testDirective { id, name }');
expect(print(mutationASTWithArtifacts)).toBe(dedent`
···
trip(wheelchair: false, arriveBy: false) {
dateTime
}
-
}
-
`
+
}`
);
});
···
{
__typename
-
}
-
`) + '\n'
+
}`)
);
});
});
···
function dedent(strings, ...values) {
let str = strings[0];
for (let i = 1; i < strings.length; ++i) str += values[i - 1] + strings[i]; // interpolation
-
return dedentString(str) + '\n';
+
return dedentString(str);
}
+1 -1
package.json
···
}
},
"devDependencies": {
-
"@0no-co/graphql.web": "^0.1.5",
+
"@0no-co/graphql.web": "^0.1.6",
"@babel/core": "^7.21.3",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-buble": "^1.0.2",
+4 -4
pnpm-lock.yaml
···
.:
specifiers:
-
'@0no-co/graphql.web': ^0.1.5
+
'@0no-co/graphql.web': ^0.1.6
'@babel/core': ^7.21.3
'@rollup/plugin-babel': ^6.0.3
'@rollup/plugin-buble': ^1.0.2
···
typescript: ^5.0.2
vitest: ^0.29.7
devDependencies:
-
'@0no-co/graphql.web': 0.1.5
+
'@0no-co/graphql.web': 0.1.6
'@babel/core': 7.21.3
'@rollup/plugin-babel': 6.0.3_7q3kejatfh3gjru7whmg6sfpeq
'@rollup/plugin-buble': 1.0.2_rollup@3.20.0
···
packages:
-
/@0no-co/graphql.web/0.1.5:
-
resolution: {integrity: sha512-a4b2IoVjFF3QpBYs+rd+6UBxo0prF33TgJoIHMZZI3zaFxIEfaaadDfudAGZNBhk+wK8ocHN0wSLSu5prbGRng==}
+
/@0no-co/graphql.web/0.1.6:
+
resolution: {integrity: sha512-HUFsLTSjX6sTdK+CyoHNs71h0HneugTO6nQS8WwxFGarmAh3doKwZRVY39xLkdOmneSKJZIHRysjf+odHHBFhw==}
dev: true
/@ampproject/remapping/2.2.0: