Files
old-spike/config/graphql/node.js

21 lines
350 B
JavaScript
Raw Normal View History

2016-01-27 20:15:09 -06:00
import {
2016-01-31 17:18:27 -06:00
fromGlobalId,
2016-01-27 20:15:09 -06:00
nodeDefinitions,
} from 'graphql-relay';
2016-01-26 19:42:30 -06:00
var {nodeInterface, nodeField} = nodeDefinitions(
(globalId) => {
var {type, id} = fromGlobalId(globalId);
2016-01-27 20:15:09 -06:00
return null;
2016-01-26 19:42:30 -06:00
},
(obj) => {
2016-01-27 20:15:09 -06:00
if (obj instanceof Array) {
return Array;
2016-01-26 19:42:30 -06:00
} else {
return null;
}
}
);
2016-01-27 20:15:09 -06:00
export {nodeInterface, nodeField};