Options
All
  • Public
  • Public/Protected
  • All
Menu

EF DOM GraphQL Type

Provides a GraphQL type for representing a EF Carbon DOM tree.

import { GraphQLObjectType } from 'graphql';

import { NodeText } from '@ef-carbon/dom'
import { GraphQLNonNullDom } from '@ef-carbon/graphql-type-dom';

const query = new GraphQLObjectType({
  name: 'Query',
  fields: {
    dom: {
      type: GraphQLNonNullDom,
      resolve: () => new NodeText('text'),
    },
  }
});