UNPKG

ra-data-graphql-simple

Version:

A GraphQL simple data provider for react-admin

13 lines 477 B
import { TypeKind, } from 'graphql'; import * as gqlTypes from 'graphql-ast-types-browser'; export var getGqlType = function (type) { switch (type.kind) { case TypeKind.LIST: return gqlTypes.listType(getGqlType(type.ofType)); case TypeKind.NON_NULL: return gqlTypes.nonNullType(getGqlType(type.ofType)); default: return gqlTypes.namedType(gqlTypes.name(type.name)); } }; //# sourceMappingURL=getGqlType.js.map