Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gei-crud

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gei-crud

GraphQL Editor integration for stucco. Allows basic crud operations and relations.

  • 0.9.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

GraphQL Editor Integration - CRUD

This integration allows basic CRUD operations with mongodb as a database

How to use in GraphQL Editor

  1. Select Type and field in stucco config
  2. Select From integration
  3. Select gei-crud/Query.objects for objects or gei-crud/Mutation.create for Creation

How to use in code

$ npm i gei-users

Add this to your stucco.json file

{
  "resolvers": {
    "<Type>.<fieldName>": {
      "resolve": {
        "name": "node_modules/gei-crud/lib/Query/objects"
      }
    },
    "<Type>.<fieldName>": {
      "resolve": {
        "name": "node_modules/gei-crud/lib/Mutation/create"
      }
    }
  }
}

where Type and fieldName are defined for your schema, for example:

{
  "resolvers": {
    "Query.posts": {
      "data": {
        "model": "Post"
      },
      "resolve": {
        "name": "node_modules/gei-crud/lib/Query/objects"
      }
    },
    "Mutation.createPost": {
      "data": {
        "model": "Post"
      },
      "resolve": {
        "name": "node_modules/gei-crud/lib/Mutation/create"
      }
    }
  }
}

They need to implement the SDL type parameters.

FAQs

Package last updated on 26 Mar 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc