🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

graphql-static-binding

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-static-binding - npm Package Compare versions

Comparing version

to
0.2.1

renovate.json

2

dist/generators/graphcool-js.js

@@ -11,3 +11,3 @@ "use strict";

function renderMainMethod(queryType, mutationType, subscriptionType) {
return "module.exports.Binding = class Binding extends Graphcool {\n \n constructor({ endpoint, secret, fragmentReplacements, debug }) {\n super({ typeDefs, endpoint, secret, fragmentReplacements, debug });\n\n var self = this\n this.query = {\n" + renderMainMethodFields('query', queryType.getFields()) + "\n }" + (mutationType ? "\n \n this.mutation = {\n" + renderMainMethodFields('mutation', mutationType.getFields()) + "\n }" : '') + "\n }\n \n delegate(operation, field, args, context, info) {\n return super.delegate(operation, field, args, context, info)\n }\n}";
return "module.exports.Graphcool = class Binding extends Graphcool {\n \n constructor({ endpoint, secret, fragmentReplacements, debug }) {\n super({ typeDefs, endpoint, secret, fragmentReplacements, debug });\n\n var self = this\n this.query = {\n" + renderMainMethodFields('query', queryType.getFields()) + "\n }" + (mutationType ? "\n \n this.mutation = {\n" + renderMainMethodFields('mutation', mutationType.getFields()) + "\n }" : '') + "\n }\n \n delegate(operation, field, args, context, info) {\n return super.delegate(operation, field, args, context, info)\n }\n}";
}

@@ -14,0 +14,0 @@ function renderMainMethodFields(operation, fields) {

@@ -24,6 +24,6 @@ "use strict";

function renderHeader(schema) {
return "import { Graphcool, BaseGraphcoolOptions } from 'graphcool-binding'\nimport { GraphQLResolveInfo } from 'graphql'\n\nconst typeDefs = `\n" + schema + "`";
return "import { Graphcool as BaseGraphcool, BaseGraphcoolOptions } from 'graphcool-binding'\nimport { GraphQLResolveInfo } from 'graphql'\n\nconst typeDefs = `\n" + schema + "`";
}
function renderMainMethod(queryType, mutationType, subscriptionType) {
return "export class Binding extends Graphcool {\n \n constructor({ endpoint, secret, fragmentReplacements, debug }: BaseGraphcoolOptions) {\n super({ typeDefs, endpoint, secret, fragmentReplacements, debug });\n }\n \n query: Query = {\n" + renderMainMethodFields('query', queryType.getFields()) + "\n }" + (mutationType ? "\n\n mutation: Mutation = {\n" + renderMainMethodFields('mutation', mutationType.getFields()) + "\n }" : '') + "\n}";
return "export class Graphcool extends BaseGraphcool {\n \n constructor({ endpoint, secret, fragmentReplacements, debug }: BaseGraphcoolOptions) {\n super({ typeDefs, endpoint, secret, fragmentReplacements, debug });\n }\n \n query: Query = {\n" + renderMainMethodFields('query', queryType.getFields()) + "\n }" + (mutationType ? "\n\n mutation: Mutation = {\n" + renderMainMethodFields('mutation', mutationType.getFields()) + "\n }" : '') + "\n}";
}

@@ -30,0 +30,0 @@ function renderMainMethodFields(operation, fields) {

{
"name": "graphql-static-binding",
"version": "0.2.0",
"version": "0.2.1",
"description": "Generate static binding files for a GraphQL schema",

@@ -18,9 +18,9 @@ "main": "dist/index.js",

"dependencies": {
"graphql": "^0.12.3"
"graphql": "0.12.3"
},
"devDependencies": {
"@types/node": "^8.5.2",
"ts-node": "^4.1.0",
"typescript": "^2.6.2"
"@types/node": "8.5.2",
"ts-node": "4.1.0",
"typescript": "2.6.2"
}
}
# graphql-static-binding [![wip](https://img.shields.io/badge/status-WIP-red.svg?style=for-the-badge)]()
Generate static binding files for a GraphQL schema
<hr>
<p align="center">
<img src="https://img.shields.io/badge/built-with_love-blue.svg?style=for-the-badge"/><a href="https://github.com/kbrandwijk" target="-_blank"><img src="https://img.shields.io/badge/by-kim_brandwijk-blue.svg?style=for-the-badge"/></a>
</p>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet