simple-graphql
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -242,2 +242,7 @@ 'use strict'; | ||
var viewerInstance = { | ||
_type: 'Viewer', | ||
id: relay.toGlobalId('Viewer', 'viewer') | ||
}; | ||
var nodeConfig = { | ||
@@ -265,3 +270,3 @@ name: 'node', | ||
if (models[id.type]) { | ||
if (!(id.type === 'Viewer')) { | ||
_context.next = 3; | ||
@@ -271,9 +276,17 @@ break; | ||
return _context.abrupt('return', viewerInstance); | ||
case 3: | ||
if (models[id.type]) { | ||
_context.next = 5; | ||
break; | ||
} | ||
return _context.abrupt('return', null); | ||
case 3: | ||
_context.next = 5; | ||
case 5: | ||
_context.next = 7; | ||
return models[id.type].findOne({ where: { id: id.id } }); | ||
case 5: | ||
case 7: | ||
record = _context.sent; | ||
@@ -286,3 +299,3 @@ | ||
case 8: | ||
case 10: | ||
case 'end': | ||
@@ -304,7 +317,2 @@ return _context.stop(); | ||
var viewerInstance = { | ||
_type: 'Viewer', | ||
id: relay.toGlobalId('Viewer', 'viewer') | ||
}; | ||
var viewerType = new graphql.GraphQLObjectType({ | ||
@@ -320,2 +328,3 @@ name: 'Viewer', | ||
}); | ||
context.graphQLObjectTypes['Viewer'] = viewerType; | ||
@@ -322,0 +331,0 @@ return new graphql.GraphQLSchema({ |
{ | ||
"name": "simple-graphql", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "The simple way to generates GraphQL schemas and Sequelize models from your models definition.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
{ | ||
"name": "simple-graphql", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "The simple way to generates GraphQL schemas and Sequelize models from your models definition.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4613
475722