Skip to content
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

Updated to standard v17 #783

Merged
merged 2 commits into from
May 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ const plugin = fp(async function (app, opts) {
}),
mutation: opts.defineMutation
? new GraphQLObjectType({
name: 'Mutation',
fields: {}
})
name: 'Mutation',
fields: {}
})
: undefined
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/gateway/service-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async function buildServiceMap (services, errorHandler, log) {
const url = new URL(Array.isArray(opts.url) ? opts.url[0] : opts.url)

const serviceConfig = {
mandatory: mandatory,
mandatory,
sendRequest: sendRequest(request, url, useSecureParse),
close,
async refresh () {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@sinonjs/fake-timers": "^9.0.0",
"@types/node": "^17.0.0",
"@types/ws": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"autocannon": "^7.3.0",
"concurrently": "^7.0.0",
"docsify-cli": "^4.4.3",
Expand All @@ -46,7 +46,7 @@
"sinon": "^13.0.0",
"snazzy": "^9.0.0",
"split2": "^4.0.0",
"standard": "^16.0.3",
"standard": "^17.0.0",
"tap": "^16.0.0",
"tsd": "^0.20.0",
"typescript": "^4.3.5",
Expand Down
2 changes: 1 addition & 1 deletion test/app-decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ test('defineResolvers should throw if field is not defined in schema', async (t)
}
}

app.register(GQL, { schema: schema })
app.register(GQL, { schema })

app.register(async function (app) {
t.throws(function () {
Expand Down
4 changes: 2 additions & 2 deletions test/gateway/application-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test('onGatewayReplaceSchema - polling interval with a new schema should trigger
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down Expand Up @@ -145,7 +145,7 @@ test('onGatewayReplaceSchema - should log an error should any errors occur in th
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down
10 changes: 5 additions & 5 deletions test/gateway/pollingInterval.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test('Polling schemas', async (t) => {
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down Expand Up @@ -223,7 +223,7 @@ test('Polling schemas (gateway.polling interval is not a number)', async (t) =>
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down Expand Up @@ -287,7 +287,7 @@ test("Polling schemas (if service is down, schema shouldn't be changed)", async
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down Expand Up @@ -443,7 +443,7 @@ test('Polling schemas (if service is mandatory, exception should be thrown)', as
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true
})

Expand Down Expand Up @@ -959,7 +959,7 @@ test('Polling schemas (subscriptions should be handled)', async (t) => {
name: String!
}
`,
resolvers: resolvers,
resolvers,
federationMetadata: true,
subscription: true
})
Expand Down
2 changes: 1 addition & 1 deletion test/gateway/subscription-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ test('gateway - should call onSubscriptionEnd when subscription ends', async t =
id: 1,
type: 'stop',
payload: {
query: query
query
}
}))

Expand Down
6 changes: 3 additions & 3 deletions test/subscription-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ test('subscription - should handle onSubscriptionResolution hook errors', async
id: 1,
type: 'start',
payload: {
query: query
query
}
}))

Expand Down Expand Up @@ -341,7 +341,7 @@ test('subscription - should call onSubscriptionEnd when subscription ends', asyn
id: 1,
type: 'start',
payload: {
query: query
query
}
}))

Expand Down Expand Up @@ -382,7 +382,7 @@ test('subscription - should handle onSubscriptionEnd hook errors', async t => {
id: 1,
type: 'start',
payload: {
query: query
query
}
}))

Expand Down
16 changes: 8 additions & 8 deletions test/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ declare module '../../' {
}

app.register(mercurius, {
schema: schema,
schema,
resolvers,
loaders: {},
ide: false,
Expand All @@ -83,7 +83,7 @@ app.register(mercurius, {
})

app.register(mercurius, {
schema: schema,
schema,
resolvers,
loaders: {},
ide: false,
Expand Down Expand Up @@ -452,15 +452,15 @@ gateway.register(mercurius, {
// Subscriptions

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: true
})

const emitter = mq()

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: {
emitter,
Expand Down Expand Up @@ -492,7 +492,7 @@ app.register(mercurius, {
})

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: {
context: async (connection, request) => {
Expand All @@ -509,15 +509,15 @@ app.register(mercurius, {
})

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: {
emitter
}
})

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: {
fullWsTransport: true
Expand Down Expand Up @@ -612,7 +612,7 @@ class CustomPubSub {
}

app.register(mercurius, {
schema: schema,
schema,
resolvers,
subscription: {
pubsub: new CustomPubSub()
Expand Down