Skip to content
This repository was archived by the owner on May 10, 2018. It is now read-only.

Commit 6e71cb7

Browse files
authored
feat(graphcool): change export name (#8)
1 parent 52d166f commit 6e71cb7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-static-binding",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Generate static binding files for a GraphQL schema",
55
"main": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -15,7 +15,7 @@
1515
"author": "Kim Brandwijk <[email protected]>",
1616
"license": "MIT",
1717
"dependencies": {
18-
"graphql": "^0.12.3"
18+
"graphql": "0.12.3"
1919
},
2020
"devDependencies": {
2121
"@types/node": "8.5.2",

src/generators/graphcool-js.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ${schema}\``
3535

3636

3737
function renderMainMethod(queryType: GraphQLObjectType, mutationType?: GraphQLObjectType | null, subscriptionType?: GraphQLObjectType | null) {
38-
return `module.exports.Binding = class Binding extends Graphcool {
38+
return `module.exports.Graphcool = class Binding extends Graphcool {
3939
4040
constructor({ endpoint, secret, fragmentReplacements, debug }) {
4141
super({ typeDefs, endpoint, secret, fragmentReplacements, debug });

src/generators/graphcool-ts.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ const scalarMapping = {
4242
}
4343

4444
function renderHeader(schema: string): string {
45-
return `import { Graphcool, BaseGraphcoolOptions } from 'graphcool-binding'
45+
return `import { Graphcool as BaseGraphcool, BaseGraphcoolOptions } from 'graphcool-binding'
4646
import { GraphQLResolveInfo } from 'graphql'
4747
4848
const typeDefs = \`
4949
${schema}\``
5050
}
5151

5252
function renderMainMethod(queryType: GraphQLObjectType, mutationType?: GraphQLObjectType | null, subscriptionType?: GraphQLObjectType | null) {
53-
return `export class Binding extends Graphcool {
53+
return `export class Graphcool extends BaseGraphcool {
5454
5555
constructor({ endpoint, secret, fragmentReplacements, debug }: BaseGraphcoolOptions) {
5656
super({ typeDefs, endpoint, secret, fragmentReplacements, debug });

0 commit comments

Comments
 (0)