Module diana::graphql_utils[][src]

Expand description

The module for utility functions for schema development.

Functions

Gets authentication data from the context of a GraphQL resolver. This should only fail if the server is constructed without authentication middleware (which shouldn’t be possible with the exposed API surface of this crate).

Gets a subscription stream to events published on a particular channel from the context of a GraphQL resolver. This must only be used in subscriptions! It will not work anywhere else! This returns a pre-created stream which you should manipulate if necessary. All data sent via the publisher from the queries/mutations system will land here in string format. Serialization is up to you.