specify a different storage namespace prefix from the default of 'graphiql'
This describes the attributes and methods that a store has to support in
order to be used with GraphiQL. It closely resembles the localStorage
API as it is the default storage used in GraphiQL.
The number of items that are currently stored.
Remove all items from the store.
Retrieve an item from the store by its key.
The key of the item to retrieve.
The stored value for the given key if it exists, null
otherwise.
Remove the value for a given key from the store. If there is no value for the given key this method does nothing.
The key to remove the value from the store.
Add a value to the store for a given key. If there already exists a value for the given key, this method will override the value.
The key to store the value for.
The value to store.
build a GraphiQL fetcher that is:
Allow legacy websockets protocol client, but no definitions for it, as the library is deprecated and has security issues
generate a custom local storage adapter for GraphiQL storage
prop.
Create a fetcher with the IncrementalDelivery
HTTP/S spec for
@stream
and @defer
support using fetch-multipart-graphql
create a simple HTTP/S fetcher using a fetch implementation where multipart is not needed
Create ws/s fetcher using provided wsClient implementation
Given a document string which may not be valid due to terminal fields not representing leaf values (Spec Section: "Leaf Field Selections"), and a function which provides reasonable default field names for a given type, this function will attempt to produce a schema which is valid after filling in selection sets for the invalid fields.
Note that there is no guarantee that the result will be a valid query, this utility represents a "best effort" which may be useful within IDE tools.
Provided optional previous operations and selected name, and a next list of operations, determine what the next selected operation should be.
If wsClient
or legacyClient
are provided, then subscriptionUrl
is overridden.
Returns true if the name matches a subscription in the AST
the operation name to lookup
Given a document AST, inline all named fragment definitions.
Generated using TypeDoc
Changelog | API Docs | NPM | Discord
@graphiql/toolkit
This is a general purpose library for building GraphQL IDEs. It's being used by other packages like
graphiql
and@graphiql/react
and also provides utilities that are useful when working with these packages.Docs
createFetcher
: a utility for creating afetcher
prop implementation for HTTP GET, POST including multipart, websockets fetcher