Socket
Book a DemoInstallSign in
Socket

@adeira/graphql-relay-fauna

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adeira/graphql-relay-fauna

Helpers for Relay compliant GraphQL server with FaunaDB backend

latest
npmnpm
Version
0.3.0
Version published
Weekly downloads
2
Maintainers
4
Weekly downloads
 
Created
Source

Helpers for Relay compliant GraphQL server with FaunaDB backend

Install

yarn add @adeira/graphql-relay-fauna

Basic usage

If your GraphQL type resolves from Fauna document, use GlobalFaunaID to automatically create id field with globally unique value. This is required for Global Object Identification and Node interface.

import GlobalFaunaID from '@adeira/graphql-relay-fauna';

export default new GraphQLObjectType({
  name: 'TypeName',
  fields: {
    id: GlobalFaunaID(),
  },
  interfaces: [GraphQLNodeInterface],
  isTypeOf: ({ ref }): boolean => ref.collection.id === 'TypeName',
});

FAQs

Package last updated on 01 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts