graphql-component
Advanced tools
Comparing version 1.1.1 to 1.1.2
### v1.1.1 | ||
- [BREAKING (sorry, but it is 5 minutes later)]: data sources appear by constructor name on context | ||
- `execute` now supports both document objects and strings. | ||
### v1.1.1 | ||
- [BREAKING from 1.1.0 (sorry, but it is 5 minutes later)]: data sources appear by constructor name on context | ||
### v1.1.0 | ||
@@ -6,0 +10,0 @@ |
@@ -106,3 +106,5 @@ 'use strict'; | ||
execute(input, { root = undefined, context = {}, variables = {} } = {}) { | ||
return graphql.execute({ schema: this.schema, document: gql`${this._fragments.join('\n')}\n${input}`, rootValue: root, contextValue: context, variableValues: variables }); | ||
const document = typeof input === 'string' ? gql`${this._fragments.join('\n')}\n${input}` : input; | ||
return graphql.execute({ document, schema: this.schema, rootValue: root, contextValue: context, variableValues: variables }); | ||
} | ||
@@ -109,0 +111,0 @@ |
{ | ||
"name": "graphql-component", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Build graphql schema with components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
25825
428