forked from graphql/graphql-js
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Export OperationTypeNode as value (graphql#3316) * Convert const "enum-like" maps to TS enums (graphql#3317) * Deprecate 'ASTKindToNode' (graphql#3318) * Add message that we only support TS >= 4.1.0 (graphql#3319) * Update deps (graphql#3320) * 16.0.0-rc.5 * jsutils: add test for Path functions (graphql#2478) Co-authored-by: Ivan Goncharov <[email protected]> * lexer: fix expression to decode surrogate pairs (graphql#3278) * Lexer: use standard JS functions to handle Unicode (graphql#3322) * GraphQLError-test: merge check of source with rest of the properties (graphql#3324) * GraphQLError: fix empty `locations` if error got nodes without locations (graphql#3325) * GraphQLError: enumerate only spec prescribed properties (graphql#3326) * GraphQLField: relax default value of TArgs to `any` (graphql#3328) * 16.0.0-rc.6 * Fix release instructions (graphql#3329) * use GITHUB_TOKEN (graphql#3330) * GraphQLError: Add test to check order of fields in JSON.stringify (graphql#3336) * Fix TS error caused by importing internal files directly (graphql#3339) * Use default GITHUB_ACTOR if unset (graphql#3331) Co-authored-by: Ivan Goncharov <[email protected]> * 16.0.0-rc.7 * version: force proper typing on version literals Types should be generic and stay the same across different versions E.g. `preReleaseTag` should be typed `string | null` even if it's a `null` literal for this particular release * build-npm: fix type inference during TS declarations build * version-test: fix validation of `versionInfo.preReleaseTag` (graphql#3345) * 16.0.0 * checkgit.sh: Added a check for local modifications (graphql#3347) * GraphQLError-test: text how extensions is inherited from originalError (graphql#3348) * fix lockfile * update graphql version * Remove unused upstream file * Upgrade deps * add changeset Co-authored-by: Ivan Goncharov <[email protected]> Co-authored-by: Christoph Zwerschke <[email protected]>
- Loading branch information
1 parent
ecfd106
commit 9e9653f
Showing
8 changed files
with
2,142 additions
and
1,710 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'graphql-executor': patch | ||
--- | ||
|
||
Update dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { NameNode } from 'graphql/language'; | ||
|
||
// Parser class is internal API so so any changes to it are never considered breaking changes. | ||
// We just want to test that we are able to import it. | ||
import { Parser } from 'graphql/language/parser'; | ||
|
||
const parser = new Parser('foo'); | ||
const ast: NameNode = parser.parseName(); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
|
||
import { addPath, pathToArray } from '../Path'; | ||
|
||
describe('Path', () => { | ||
it('can create a Path', () => { | ||
const first = addPath(undefined, 1, 'First'); | ||
|
||
expect(first).to.deep.equal({ | ||
prev: undefined, | ||
key: 1, | ||
typename: 'First', | ||
}); | ||
}); | ||
|
||
it('can add a new key to an existing Path', () => { | ||
const first = addPath(undefined, 1, 'First'); | ||
const second = addPath(first, 'two', 'Second'); | ||
|
||
expect(second).to.deep.equal({ | ||
prev: first, | ||
key: 'two', | ||
typename: 'Second', | ||
}); | ||
}); | ||
|
||
it('can convert a Path to an array of its keys', () => { | ||
const root = addPath(undefined, 0, 'Root'); | ||
const first = addPath(root, 'one', 'First'); | ||
const second = addPath(first, 2, 'Second'); | ||
|
||
const path = pathToArray(second); | ||
expect(path).to.deep.equal([0, 'one', 2]); | ||
}); | ||
}); |