Skip to content

Commit

Permalink
fix: add missing .js extension to type imports (#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Nov 29, 2022
1 parent 49b9620 commit 534780c
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-parents-call.md
@@ -0,0 +1,5 @@
---
'graphql-yoga': patch
---

Add missing .js extension to type imports
4 changes: 2 additions & 2 deletions packages/graphql-yoga/src/error.ts
@@ -1,8 +1,8 @@
import { createGraphQLError } from '@graphql-tools/utils'
import { GraphQLError } from 'graphql'
import type { YogaLogger } from './logger.js'
import type { ResultProcessorInput } from './plugins/types'
import type { YogaMaskedErrorOpts } from './types'
import type { ResultProcessorInput } from './plugins/types.js'
import type { YogaMaskedErrorOpts } from './types.js'

export { createGraphQLError }

Expand Down
8 changes: 4 additions & 4 deletions packages/graphql-yoga/src/plugins/plugins.test.ts
@@ -1,8 +1,8 @@
import { AfterValidateHook } from '@envelop/core'
import { Plugin } from './types'
import { createYoga } from '../server'
import { createSchema } from '../schema'
import { createGraphQLError } from '../error'
import { Plugin } from './types.js'
import { createYoga } from '../server.js'
import { createSchema } from '../schema.js'
import { createGraphQLError } from '../error.js'

const schema = createSchema({
typeDefs: /* GraphQL */ `
Expand Down
@@ -1,6 +1,6 @@
import { createGraphQLError } from '@graphql-tools/utils'
import type { GraphQLParams } from '../../types'
import type { Plugin } from '../types'
import type { GraphQLParams } from '../../types.js'
import type { Plugin } from '../types.js'

const expectedParameters = new Set([
'query',
Expand Down
@@ -1,5 +1,5 @@
import { createGraphQLError } from '@graphql-tools/utils'
import type { Plugin } from '../types'
import type { Plugin } from '../types.js'

export function isValidMethodForGraphQL(
method: string,
Expand Down
@@ -1,6 +1,6 @@
import { AggregateError } from '@graphql-tools/utils'
import { GraphQLError } from 'graphql'
import type { Plugin } from '../types'
import type { Plugin } from '../types.js'

export function getAggregateErrorFromErrors(
errors: readonly GraphQLError[],
Expand Down
@@ -1,5 +1,5 @@
import { createGraphQLError } from '../../error.js'
import type { Plugin } from '../types'
import type { Plugin } from '../types.js'

export function useLimitBatching(limit?: number): Plugin {
return {
Expand Down
Expand Up @@ -6,8 +6,8 @@ import {
GraphQLError,
DocumentNode,
} from 'graphql'
import type { YogaInitialContext } from '../../types'
import type { Plugin } from '../types'
import type { YogaInitialContext } from '../../types.js'
import type { Plugin } from '../types.js'

export function assertMutationViaGet(
method: string,
Expand Down
@@ -1,5 +1,5 @@
import { ExecutionResult } from '@graphql-tools/utils'
import type { MaybeArray } from '../../types'
import type { MaybeArray } from '../../types.js'

// JSON stringifier that adjusts the result extensions while serialising
export function jsonStringifyResult(result: MaybeArray<ExecutionResult>) {
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-yoga/src/plugins/useSchema.ts
@@ -1,7 +1,7 @@
import { PromiseOrValue } from '@envelop/core'
import { GraphQLSchema, isSchema } from 'graphql'
import type { GraphQLSchemaWithContext, YogaInitialContext } from '../types'
import type { Plugin } from './types'
import type { GraphQLSchemaWithContext, YogaInitialContext } from '../types.js'
import type { Plugin } from './types.js'

export type YogaSchemaDefinition<TContext> =
| PromiseOrValue<GraphQLSchemaWithContext<TContext>>
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-yoga/src/plugins/useUnhandledRoute.ts
@@ -1,4 +1,4 @@
import type { Plugin } from './types'
import type { Plugin } from './types.js'
import landingPageBody from '../landing-page-html.js'

export function useUnhandledRoute(args: {
Expand Down

0 comments on commit 534780c

Please sign in to comment.