-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* aa * removes unneeded `undefined` * try * fix * fix vitest
- Loading branch information
1 parent
7275c19
commit 2ad4e75
Showing
18 changed files
with
497 additions
and
126 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 @@ | ||
--- | ||
'@graphiql/toolkit': minor | ||
--- | ||
|
||
compile with `tsup` instead of `tsc` |
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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
{ | ||
"extends": "../../resources/tsconfig.base.cjs.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./dist", | ||
"composite": true, | ||
"jsx": "react", | ||
"target": "es5", | ||
"baseUrl": ".", | ||
"strictPropertyInitialization": false | ||
"target": "es2016", | ||
"module": "ESNext", | ||
"declaration": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"allowJs": true, | ||
"lib": ["es2022", "dom"], | ||
"moduleResolution": "node" | ||
}, | ||
"include": ["src"], | ||
"exclude": [ | ||
"**/__tests__/**", | ||
"**/dist/**.*", | ||
"**/*.spec.ts", | ||
"**/*.spec.js", | ||
"**/*-test.ts", | ||
"**/*-test.js" | ||
] | ||
"include": ["src", "tsup.config.ts"], | ||
"exclude": ["**/*.spec.ts"] | ||
} |
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,22 @@ | ||
import { defineConfig, Options } from 'tsup'; | ||
|
||
const opts: Options = { | ||
entry: ['src/**/*.ts', '!**/__tests__'], | ||
bundle: false, | ||
clean: true, | ||
dts: true, | ||
}; | ||
|
||
export default defineConfig([ | ||
{ | ||
...opts, | ||
format: 'esm', | ||
outDir: 'dist/esm', | ||
outExtension: () => ({ js: '.js' }), | ||
}, | ||
{ | ||
...opts, | ||
format: 'cjs', | ||
outDir: 'dist/cjs', | ||
}, | ||
]); |
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,31 @@ | ||
/** | ||
* Copyright (c) 2021 GraphQL Contributors. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const express = require('express'); | ||
const path = require('node:path'); | ||
// eslint-disable-next-line import-x/no-extraneous-dependencies | ||
const { createHandler } = require('graphql-http/lib/use/express'); | ||
const schema = require('./schema'); | ||
const badSchema = require('../cypress/fixtures/bad-schema.json'); | ||
|
||
module.exports = function beforeDevServer(app, _server, _compiler) { | ||
// GraphQL Server | ||
app.post('/graphql', createHandler({ schema })); | ||
app.get('/graphql', createHandler({ schema })); | ||
|
||
app.post('/bad/graphql', (_req, res, next) => { | ||
res.json({ data: badSchema }); | ||
next(); | ||
}); | ||
|
||
app.use('/images', express.static(path.join(__dirname, 'images'))); | ||
|
||
app.use( | ||
'/resources/renderExample.js', | ||
express.static(path.join(__dirname, '../resources/renderExample.js')), | ||
); | ||
}; |
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
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
Oops, something went wrong.