How to use join-monster - 10 common examples

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
github benawad / baklava / resolvers.js View on Github external
getBoard: (parent, args, { models }, info) =>
      joinMonster(info, args, sql =>
        models.sequelize.query(sql, { type: models.sequelize.QueryTypes.SELECT }),
      ),
    allBoards: (parent, args, { models }, info) =>
github tslater / reactnative-relay-offline / graphql / relay-schema / QueryRoot.js View on Github external
resolve: (parent, args, context, resolveInfo) => {
        return joinMonster(resolveInfo, context, sql => dbCall(sql, database, context), options)
      }
    }
github CSG4 / super-graphiql / packages / super-graphiql-react / example / server / SQL / resolvers / student.js View on Github external
getStudent: (parent, args, { models }, info) =>
      joinMonster.default(info, args, sql =>
        models.sequelize.query(sql, { type: models.sequelize.QueryTypes.SELECT }),
      ),
  },
github CSG4 / super-graphiql / packages / super-graphiql-react / example / server / SQL / resolvers / subject.js View on Github external
getSubject: (parent, args, { models }, info) =>
      joinMonster.default(info, args, sql =>
        models.sequelize.query(sql, { type: models.sequelize.QueryTypes.SELECT }),
      ),
  },
github acarl005 / join-monster-graphql-tools-adapter / src / schema.js View on Github external
user(parent, args, ctx, resolveInfo) {
      return joinMonster(resolveInfo, ctx, sql => {
        return db.all(sql)
      }, { dialect: 'sqlite3' })
    }
  },

join-monster

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

MIT
Latest version published 6 months ago

Package Health Score

70 / 100
Full package analysis