Skip to content

refactor: treeshakable kind enum #4269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1112b4d
Expose GraphQLErrorOptions type (#3554) (#3565)
IvanGoncharov May 9, 2022
1f8ba95
16.5.0
IvanGoncharov May 9, 2022
59a73d6
createSourceEventStream: introduce named arguments and deprecate posi…
yaacovCR Jun 15, 2022
af8221a
Workaround for codesandbox having bug with TS enums (#3686)
IvanGoncharov Aug 16, 2022
6c6508b
Parser: allow 'options' to explicitly accept undefined (#3701)
IvanGoncharov Aug 16, 2022
f0a0a4d
parser: limit maximum number of tokens (#3702)
IvanGoncharov Aug 16, 2022
3a51eca
16.6.0
IvanGoncharov Aug 16, 2022
4a82557
Fix crash in node when mixing sync/async resolvers (backport of #3706…
chrskrchr Oct 17, 2022
076972e
Fix/invalid error propagation custom scalars (backport for 16.x.x) (#…
stenreijers Feb 15, 2023
84bb146
check "globalThis.process" before accessing it (#3887)
kettanaito May 2, 2023
1519fda
16.7.0
IvanGoncharov Jun 21, 2023
a08aaee
instanceOf: workaround bundler issue with `process.env` (#3923)
IvanGoncharov Jun 22, 2023
bf6a9f0
16.7.1
IvanGoncharov Jun 22, 2023
bec1b49
Support fourfold nested lists (#3950)
gschulze Aug 14, 2023
e4f759d
16.8.0
IvanGoncharov Aug 14, 2023
8f4c64e
OverlappingFieldsCanBeMergedRule: Fix performance degradation (#3967)
AaronMoat Sep 10, 2023
8a95335
16.8.1
IvanGoncharov Sep 19, 2023
0d12b06
fix: remove `globalThis` check and align with what bundlers can accep…
JoviDeCroock May 29, 2024
c82609e
Fix publish scripts (#4104)
benjie Jun 12, 2024
08779a0
16.8.2
benjie Jun 12, 2024
c985c27
backport[v16]: Introduce "recommended" validation rules (#4119)
benjie Jun 21, 2024
29c1bff
feat: allow defining symbol error extensions (#3730)
n1ru4l Jun 21, 2024
c35130e
Revert error extension symbol (#4123)
benjie Jun 21, 2024
29144f7
backport[v16]: Implement OneOf Input Objects via `@oneOf` directive (…
benjie Jun 21, 2024
6a1614c
backport[v16]: Enable passing values configuration to GraphQLEnumType…
benjie Jun 21, 2024
556a01e
16.9.0
benjie Jun 21, 2024
04cba88
Upgrade codecov action and pass token (#4138)
benjie Jul 1, 2024
e1ceb8f
Fix codecov workflow (#4139)
benjie Jul 1, 2024
9a91e33
Add GraphQLConf 2024 banner (#4157)
bignimbus Aug 5, 2024
0517368
Upgrade deprecated actions (#4193)
JoviDeCroock Sep 14, 2024
993d7ce
backport(v16): Require non-empty directive locations (#4100) (#4137)
benjie Sep 18, 2024
45e28a5
fix(validation): catch OverlappingFieldsCanBeMergedRule violations wi…
sachindshinde Sep 23, 2024
2562ce0
Backport introspection type fix (#4226)
JoviDeCroock Oct 13, 2024
d1c9c42
Convert from docusaurus to nextra (#4240)
JoviDeCroock Oct 20, 2024
9959504
Add content from https://github.com/graphql/graphql.github.io/pull/17…
JoviDeCroock Oct 20, 2024
b76f463
Styling fixes (#4249)
JoviDeCroock Oct 20, 2024
72be121
Various fixes to docs (#4256)
JoviDeCroock Oct 26, 2024
16b3d01
Fix going to production
JoviDeCroock Oct 28, 2024
64798c1
refactor: treeshakable kind enum
jasonkuhrt Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copied from '.gitignore', please keep it in sync.
/.eslintcache
/.docusaurus
/node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website

# Ignore TS files inside integration test
/integrationTests/ts/*.ts
9 changes: 4 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,13 @@ rules:
yield-star-spacing: off

overrides:
- files: '**/*.ts'
- files:
- '**/*.ts'
- '**/*.tsx'
parser: '@typescript-eslint/parser'
parserOptions:
sourceType: module
project: ['tsconfig.json']
project: ['./tsconfig.json', './website/tsconfig.json']
plugins:
- '@typescript-eslint'
- 'eslint-plugin-tsdoc'
Expand Down Expand Up @@ -726,6 +728,3 @@ overrides:
import/no-commonjs: off
import/no-nodejs-modules: off
import/no-extraneous-dependencies: off
# Ignore docusarus related webpack aliases
import/no-unresolved:
['error', { 'ignore': ['^@theme', '^@docusaurus', '^@generated'] }]
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @graphql/graphql-js-reviewers
45 changes: 9 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI
on: workflow_call
on:
workflow_call:
secrets:
codecov_token:
required: true
jobs:
lint:
name: Lint source files
Expand Down Expand Up @@ -68,10 +72,6 @@ jobs:
- name: Install Dependencies
run: npm ci --ignore-scripts

# Disabled due to https://github.com/milesj/docusaurus-plugin-typedoc-api/pull/19
# - name: Check that package-lock.json doesn't have conflicts
# run: npm ls --depth 999

- name: Run npm install
run: npm install --ignore-scripts --force --package-lock-only --engine-strict --strict-peer-deps

Expand Down Expand Up @@ -144,10 +144,11 @@ jobs:

- name: Upload coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
file: ./coverage/coverage-final.json
fail_ci_if_error: true
token: ${{ secrets.codecov_token }}

test:
name: Run tests on Node v${{ matrix.node_version_to_setup }}
Expand Down Expand Up @@ -196,7 +197,7 @@ jobs:
run: npm run build:npm

- name: Upload npmDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npmDist
path: ./npmDist
Expand All @@ -214,7 +215,6 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
Expand All @@ -224,34 +224,7 @@ jobs:
run: npm run build:deno

- name: Upload denoDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: denoDist
path: ./denoDist

build-website-dist:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Build Docs
run: npm run build:website

- name: Upload denoDist package
uses: actions/upload-artifact@v2
with:
name: websiteDist
path: ./websiteDist
8 changes: 4 additions & 4 deletions .github/workflows/cmd-publish-pr-on-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm run build:npm

- name: Upload npmDist package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npmDist
path: ./npmDist
Expand All @@ -55,15 +55,15 @@ jobs:
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: npmDist
path: npmDist

- name: Modify NPM package to be canary release
env:
PULL_REQUEST_JSON: ${{ inputs.pullRequestJSON }}
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CANARY_PR_PUBLISH_TOKEN }}

- name: Upload replyMessage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: replyMessage
path: ./replyMessage.txt
2 changes: 1 addition & 1 deletion .github/workflows/cmd-run-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
EOF

- name: Upload replyMessage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: replyMessage
path: ./replyMessage.txt
2 changes: 1 addition & 1 deletion .github/workflows/deploy-artifact-as-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Remove existing files first
run: git rm -r .

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/github-actions-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
WORKFLOW_ID: ${{github.event.workflow_run.id}}

- name: Add comment on PR
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand All @@ -58,7 +58,7 @@ jobs:
cmd: ${{ steps.parse-cmd.outputs.cmd }}
pullRequestJSON: ${{ steps.parse-cmd.outputs.pullRequestJSON }}
steps:
- uses: actions/github-script@v5
- uses: actions/github-script@v7
with:
script: |
github.rest.reactions.createForIssueComment({
Expand All @@ -68,7 +68,7 @@ jobs:
});

- id: parse-cmd
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const comment = context.payload.comment.body;
Expand Down Expand Up @@ -102,12 +102,12 @@ jobs:
if: needs.accept-cmd.result != 'skipped' && always()
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: replyMessage

- if: failure()
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand All @@ -131,7 +131,7 @@ jobs:
RUN_URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}

- if: always()
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on: pull_request
jobs:
ci:
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

diff-npm-package:
name: Diff content of NPM package
Expand Down Expand Up @@ -31,7 +33,7 @@ jobs:
run: 'node resources/diff-npm-package.js BASE HEAD'

- name: Upload generated report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: npm-dist-diff.html
path: ./npm-dist-diff.html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload event.json
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: event.json
path: ${{ github.event_path }}
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on: push
jobs:
ci:
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
deploy-to-npm-branch:
name: Deploy to `npm` branch
needs: ci
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
/diff-npm-package.html
/.eslintcache
/.cspellcache
/.docusaurus
/node_modules
node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website/.next
/website/out
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Copied from '.gitignore', please keep it in sync.
/diff-npm-package.html
/.eslintcache
/.docusaurus
/node_modules
/coverage
/npmDist
/denoDist
/websiteDist
/website/out
.next
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![GraphQLConf 2024 Banner: September 10-12, San Francisco. Hosted by the GraphQL Foundation](https://github.com/user-attachments/assets/2d048502-e5b2-4e9d-a02a-50b841824de6)](https://graphql.org/conf/2024/?utm_source=github&utm_medium=graphql_js&utm_campaign=readme)

# GraphQL.js

The JavaScript reference implementation for GraphQL, a query language for APIs created by Facebook.
Expand Down
15 changes: 15 additions & 0 deletions benchmark/repeated-fields-benchmark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

const { graphqlSync } = require('graphql/graphql.js');
const { buildSchema } = require('graphql/utilities/buildASTSchema.js');

const schema = buildSchema('type Query { hello: String! }');
const source = `{ ${'hello '.repeat(250)}}`;

module.exports = {
name: 'Many repeated fields',
count: 5,
measure() {
graphqlSync({ schema, source });
},
};
61 changes: 59 additions & 2 deletions cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ ignorePaths:
- tsconfig.json
- benchmark/github-schema.graphql
- benchmark/github-schema.json
- website/icons
- website/css
overrides:
- filename: '**/docs-old/APIReference-*.md'
ignoreRegExpList: ['/href="[^"]*"/']
- filename: 'website/**'
dictionaries:
- fullstack
words:
- clsx
- infima
- noopener
- Vite
- craco
- esbuild
- swcrc
- noreferrer
- xlink

Expand Down Expand Up @@ -48,6 +52,59 @@ words:
- deno
- codecov

# Website tech
- Nextra
- headlessui
- Fastify
- tailwindcss
- svgr
- ruru

# used as href anchors
- graphqlerror
- syntaxerror
- formaterror
- graphqlschema
- graphqlscalartype
- graphqlobjecttype
- graphqlinterfacetype
- graphqluniontype
- graphqlenumtype
- graphqlinputobjecttype
- graphqllist
- graphqlnonnull
- graphqlint
- graphqlfloat
- graphqlstring
- graphqlboolean
- graphqlid
- getlocation
- isinputtype
- isoutputtype
- isleaftype
- iscompositetype
- isabstracttype
- getnullabletype
- getnamedtype
- introspectionquery
- buildclientschema
- buildschema
- printschema
- printintrospectionschema
- buildastschema
- typefromast
- astfromvalue
- typeinfo
- isvalidjsvalue
- isvalidliteralvalue
- specifiedrules
- Wordmark
- codeofconduct
- graphqlconf

# website words
- runtimes

# TODO: remove bellow words
- QLID # GraphQLID
- QLJS # GraphQLJS
Expand Down
Loading
Loading