<link rel="stylesheet" href="/_merged_assets/_static/search/noscript.css">
Apollo Elements Apollo Elements Guides API Blog Toggle darkmode

Helpers: Library Functions

lib/create-apollo-client.js

createApolloClient

Creates a simple ApolloClient

Parameters

options

Options

Limited configuration options for the client.

Returns


Exports

import { createApolloClient } from '@apollo-elements/core/lib/create-apollo-client';

lib/has-all-variables.js

hasAllVariables

Checks whether an operation includes all its non-nullable variables. Note that this can't check properties of Input types defined in schema, only top-level variables.

hasAllVariables :: Operation -> Bool

Parameters

operation

Partial<Operation>

The GraphQL operation to validate.

Returns


Exports

import { hasAllVariables } from '@apollo-elements/core/lib/has-all-variables';

lib/is-client-operation.js

isClientOperation

Helper to determine whether an operation is client-side-only

isClientOperation :: Operation -> Bool

Parameters

operation

Operation

Operation to check

Returns


Exports

import { isClientOperation } from '@apollo-elements/core/lib/is-client-operation';

lib/is-valid-gql.js

isValidGql

Validates a graphql document node.

isValidGql :: DocumentNode a => a -> Bool

Parameters

doc

unknown

Maybe a DocumentNode

Returns


Exports

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