Apollo Elements Guides API Blog

Helpers: isValidGql

Exports

import { isValidGql } from '@apollo-elements/lib/is-valid-gql';

isValidGql

Validates a graphql document node.

isValidGql :: DocumentNode a => a -> Bool

Parameters

doc

any

Maybe a DocumentNode

Returns

boolean

Whether the argument is a DocumentNode