Skip to content

Commit

Permalink
.js ext
Browse files Browse the repository at this point in the history
  • Loading branch information
sikanhe committed Dec 5, 2023
1 parent ad0529f commit 7cba2e9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"type": "commonjs"
"type": "module"
}
10 changes: 5 additions & 5 deletions examples/starwars.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { InterfaceType } from '../src';
import type { Connection, ConnectionArguments, Edge } from '../src/relay';
import { buildGraphQLSchema, Gql } from '../src';
import type { InterfaceType } from '../src/index.js';
import type { Connection, ConnectionArguments, Edge } from '../src/relay.js';
import { buildGraphQLSchema, Gql } from '../src/index.js';
import {
connectionArgs,
connectionDefinitions,
nodeDefinitions,
} from '../src/relay';
} from '../src/relay.js';
import express = require('express');
import graphqlHTTP = require('express-graphql');

declare module '../src/types' {
declare module '../src/types.js' {
interface GqlContext {
contextContent: string;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"files": ["./starwars.ts"],
"compilerOptions": {
"target": "ES2019",
"module": "commonjs"
"module": "NodeNext"
}
}
2 changes: 1 addition & 1 deletion src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
GqlContext,
UnionType,
InterfaceType,
} from './types.ts';
} from './types.js';

export function buildGraphQLSchema<RootSrc>(
schema: Schema<RootSrc>
Expand Down
2 changes: 1 addition & 1 deletion src/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type {
SubscriptionObjectType,
PromiseOrValue,
GqlContext,
} from './types.ts';
} from './types.js';

type ExtensionsMap = {
field?: {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './types.ts';
export * from './define.ts';
export * from './types.js';
export * from './define.js';
export {
buildGraphQLSchema,
toGraphQLInputType,
toGraphQLOutputType,
} from './build.ts';
} from './build.js';
4 changes: 2 additions & 2 deletions src/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
TOfArgMap,
GqlContext,
ObjectType,
} from './types.ts';
import { Gql } from './define.ts';
} from './types.js';
import { Gql } from './define.js';
import { GraphQLResolveInfo } from 'graphql';

// Adapted from
Expand Down

1 comment on commit 7cba2e9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes have been published to npm.

yarn add -E [email protected]

Please sign in to comment.