Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"mocha": "6.1.4",
"multer": "1.4.1",
"nyc": "14.1.1",
"prettier": "1.18.2",
"prettier": "1.19.1",
"promise-polyfill": "^8.1.3",
"react": "^16.8.6",
"react-dom": "^16.8.6",
Expand Down
33 changes: 24 additions & 9 deletions src/__tests__/usage-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ describe('Useful errors when incorrectly used', () => {
it('requires option factory function to return object', async () => {
const app = express();

// $DisableFlowOnNegativeTest
app.use('/graphql', graphqlHTTP(() => null));
app.use(
'/graphql',
// $DisableFlowOnNegativeTest
graphqlHTTP(() => null),
);

const response = await request(app).get('/graphql?query={test}');

Expand All @@ -37,8 +40,11 @@ describe('Useful errors when incorrectly used', () => {
it('requires option factory function to return object or promise of object', async () => {
const app = express();

// $DisableFlowOnNegativeTest
app.use('/graphql', graphqlHTTP(() => Promise.resolve(null)));
app.use(
'/graphql',
// $DisableFlowOnNegativeTest
graphqlHTTP(() => Promise.resolve(null)),
);

const response = await request(app).get('/graphql?query={test}');

Expand All @@ -56,8 +62,11 @@ describe('Useful errors when incorrectly used', () => {
it('requires option factory function to return object with schema', async () => {
const app = express();

// $DisableFlowOnNegativeTest
app.use('/graphql', graphqlHTTP(() => ({})));
app.use(
'/graphql',
// $DisableFlowOnNegativeTest
graphqlHTTP(() => ({})),
);

const response = await request(app).get('/graphql?query={test}');

Expand All @@ -72,8 +81,11 @@ describe('Useful errors when incorrectly used', () => {
it('requires option factory function to return object or promise of object with schema', async () => {
const app = express();

// $DisableFlowOnNegativeTest
app.use('/graphql', graphqlHTTP(() => Promise.resolve({})));
app.use(
'/graphql',
// $DisableFlowOnNegativeTest
graphqlHTTP(() => Promise.resolve({})),
);

const response = await request(app).get('/graphql?query={test}');

Expand All @@ -91,7 +103,10 @@ describe('Useful errors when incorrectly used', () => {

const app = express();

app.use('/graphql', graphqlHTTP(() => Promise.resolve({ schema })));
app.use(
'/graphql',
graphqlHTTP(() => Promise.resolve({ schema })),
);

const response = await request(app).get('/graphql?query={test}');

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2628,10 +2628,10 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier@1.18.2:
version "1.18.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
prettier@1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==

process-nextick-args@~2.0.0:
version "2.0.1"
Expand Down