GraphQL Editor Guide
  • GraphQL Editor
    • Home
      • Getting Started
      • Workspaces
      • Projects
      • Live Collaboration
      • Keyboard navigation
    • Graph
      • GraphQL Creator
      • ERD like Relation View
      • Markdown Docs
      • Generate TypeScript library
      • Schema versioning
      • Compare Schema Versions
    • Schema Libraries
    • Cloud
      • GraphQL API Platform
      • Instant Mock backend
      • GraphiQL Cloud
      • Endpoint switcher
      • Rest to GraphQL
      • E2E Tests Builder & Runner
    • Microservices FaaS
      • Resolvers
      • Code Editor
      • Deploy local server
      • Deploy using GraphQL Editor
      • Secrets & CORS
      • Logs
    • JS Playground
    • Github Sync
    • Troubleshooting
  • Tools
    • CLI
      • Schema
      • Create a microservice project
      • Development
      • Cloud
        • Local server
        • Deploy
          • Gitlab CI
          • Github Actions
        • Push/Pull
        • Get the CI token
      • Code Generation
        • TypeScript Typings
        • Resolvers
        • Model Types
      • Integrations
        • Installation
        • Develop your integrations
    • Stucco JS
      • Resolvers
      • Custom Scalars
      • Examples
    • GraphQL Zeus
      • Basics
        • Getting Started
        • Selectors
        • ES Modules
        • Specification
        • Use as a library
        • JavaScript
        • Custom fetch
        • Subscriptions
      • GraphQL
        • Interfaces and Unions
        • Variables
        • Aliases
        • Generate Gql
        • Directives
        • Scalars
      • Examples
        • Forms
        • React state
      • Plugins
        • Typed Document Node
        • Apollo
        • StuccoJS Subscriptions
        • React Query
Powered by GitBook
On this page
  • About
  • Configuration file
  • Local development

Was this helpful?

  1. Tools

Stucco JS

Schema first GraphQL Server Library

PreviousDevelop your integrationsNextResolvers

Last updated 2 years ago

Was this helpful?

About

Stucco-js is a JavaScript/TypeScript runtime for Stucco. It can be used as a local development environment or as a base library for implementing a FaaS runtime.

Configuration file

Stucco-js relies on the library written in GoLang. The configuration file format is in JSON.

Resolvers

{
    "resolvers":{
        "RESOLVER_TYPE.RESOLVER_FIELD":{
            "resolve":{
                "name": "PATH_TO_RESOLVER"
            }
        }
    }
}

Using TypeScript

If you have your TypeScript files in the src folder you should transpile them to the lib folder and Stucco can run it from there.

Local development

Add this script to your package json to test your backend:

{
    "scripts":{
        "start": "stucco"
    }
}

or simply run with npx via:

$ npx stucco

To start local development you need a folder with: stucco.json, schema.graphql and a file with resolvers in the root folder. To fetch your schema from the URL you can use a tool like .

Stucco
GraphQL-Zeus