How to use the join-monster.getNode function in join-monster

To help you get started, we’ve selected a few join-monster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tslater / reactnative-relay-offline / graphql / relay-schema / Node.js View on Github external
(globalId, context, resolveInfo) => {
    // parse the globalID
    const { type, id } = fromGlobalId(globalId)
    // helper method for getting Nodes from the DB, similar to the parent function.
    // also need to pass it the type name and a where function
    return joinMonster.getNode(type, resolveInfo, context, parseInt(id), sql => dbCall(sql, database, context), options)
  },
  // this function determines the type. `joinMonster` figures it out for you and attaches the type to the result in the "__type__" property

join-monster

A GraphQL to SQL query execution layer for batch data fetching.

MIT
Latest version published 4 months ago

Package Health Score

70 / 100
Full package analysis