Skip to content

Commit

Permalink
prettier formatting adjustments apollographql#4967
Browse files Browse the repository at this point in the history
  • Loading branch information
arimus authored and David Castro committed Feb 26, 2022
1 parent 81e7d23 commit f0bb33f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/apollo-server-hapi/src/ApolloServer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type hapi from '@hapi/hapi';
import type {Request} from '@hapi/hapi';
import type { Request } from '@hapi/hapi';
import { parseAll } from '@hapi/accept';

export { GraphQLOptions } from 'apollo-server-core';
Expand Down Expand Up @@ -101,16 +101,16 @@ export class ApolloServer extends ApolloServerBase {
query:
request.method === 'post'
? // TODO type payload as string or Record
(request.payload as any)
(request.payload as any)
: request.query,
request: convertNodeHttpToRequest(request.raw.req),
},
);

const response = h.response(graphqlResponse);
if (responseInit.headers) {
Object.entries(responseInit.headers).forEach(
([headerName, value]) => response.header(headerName, value),
Object.entries(responseInit.headers).forEach(([headerName, value]) =>
response.header(headerName, value),
);
}
response.code(responseInit.status || 200);
Expand Down Expand Up @@ -150,9 +150,9 @@ export class ApolloServer extends ApolloServerBase {
method: ['POST'],
path,
options: route ?? {
cors: cors ?? { origin: 'ignore' }
cors: cors ?? { origin: 'ignore' },
},
handler
handler,
});

// clear the payload route options for GET configuration
Expand All @@ -166,7 +166,7 @@ export class ApolloServer extends ApolloServerBase {
options: route ?? {
cors: cors ?? { origin: 'ignore' },
},
handler
handler,
});

this.graphqlPath = path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe('non-integration tests', () => {
{
route: {
payload: {
maxBytes: 8192 // limit bytes to 8K
maxBytes: 8192, // limit bytes to 8K
},
},
},
Expand All @@ -222,7 +222,7 @@ describe('non-integration tests', () => {
},
);

await apolloFetch({query: '{hello}'});
await apolloFetch({ query: '{hello}' });
});

it('passes each request and response toolkit through to the context function', async () => {
Expand Down

0 comments on commit f0bb33f

Please sign in to comment.