Skip to content

Commit

Permalink
patch(cli-utils/internal): Add preliminary open support from graphql …
Browse files Browse the repository at this point in the history
…15-17 (#282)
  • Loading branch information
kitten authored May 2, 2024
1 parent deed52a commit 3b34406
Show file tree
Hide file tree
Showing 8 changed files with 630 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .changeset/nice-experts-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gql.tada/cli-utils": patch
"@gql.tada/internal": patch
---

Update CLI and `@gql.tada/internal` to variably support graphql `^15.5.0` in addition to the preferred v16, and include future support for v17.
5 changes: 3 additions & 2 deletions packages/cli-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@
"@gql.tada/internal": "workspace:*",
"@vue/compiler-dom": "^3.4.23",
"@vue/language-core": "^2.0.0",
"graphql": "^16.8.1",
"graphql": "^15.5.0 || ^16.0.0 || ^17.0.0",
"svelte2tsx": "^0.7.6"
},
"peerDependencies": {
"typescript": "^5.0.0"
"typescript": "^5.0.0",
"graphql": "^15.5.0 || ^16.0.0 || ^17.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@0no-co/graphql.web": "^1.0.5"
},
"peerDependencies": {
"graphql": "^16.8.1",
"graphql": "^15.5.0 || ^16.0.0 || ^17.0.0",
"typescript": "^5.0.0"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
import { expect, describe, it } from 'vitest';
import { print } from '@0no-co/graphql.web';

import { makeIntrospectionQuery, makeIntrospectSupportQuery, toSupportedFeatures } from '../query';
import {
makeIntrospectionQuery,
makeIntrospectSupportQuery,
getPeerSupportedFeatures,
toSupportedFeatures,
} from '../introspection';

describe('getPeerSupportedFeatures', () => {
it('calculates supported features of local graphql installation', () => {
const support = getPeerSupportedFeatures();
expect(support).toMatchInlineSnapshot(`
{
"directiveArgumentsIsDeprecated": true,
"directiveIsRepeatable": true,
"fieldArgumentsIsDeprecated": true,
"inputValueDeprecation": true,
"specifiedByURL": true,
}
`);
});
});

describe('makeIntrospectSupportQuery', () => {
it('prints to introspection support query', () => {
Expand Down
Loading

0 comments on commit 3b34406

Please sign in to comment.