Module: Apollo Helper

Seeding module

Source:

Methods

(inner) resolverHelper(graphqlError, requiredPermission, permissions)

An abstracted functin which checks whether the user has the required permission/authority to perform the requested operation

Parameters:
Name Type Description
graphqlError Object

graphQL error if any

requiredPermission String

the required permission to access the resolver

permissions Array

populated list of permissions of the user

Source:
Throws:

Will throw a graphQL error if any

(inner) resultResolver(name) → {String}

An abstracted function which is reused to resolve the schema type based on the __typename attribute

Parameters:
Name Type Description
name String

GraphQL typename

Source:
Returns:

returns the resolved type name

Type
String