neo4j-graphql-workspace

A project template for progressive development of Neo4j GraphQL schemas.

Stars
7

Neo4j GraphQL Workspace

A project template for using Apollo GraphQL with a Neo4j graph database. apollo_and_neo4j

Technologies

The below technologies are necessary or recommended to get started with development:

Learning

Here is an evolving list of resources for learning more about the above technologies:

Dependencies

Run npm install in your terminal to install project dependencies. The following libraries are used to assist the development of Neo4j-GraphQL schemas:

Workflow

  1. Modify the contents of the /schema directory.

  2. Use the print command from @graphql-workspaces/cli to print the merged contents of the /schema directory to a schema.printed.graphql file next to it. Use the --watch or --validate arguments to watch for file changes or validate the merged type definitions.

    • Print: gql print schema
    • Watch: gql print schema --watch
    • Validate: gql print schema --validate
  3. Use the below scripts to run the server file and start the API at localhost:4001/graphql or to print the result of the Neo4j-GraphQL augmentation of the merged type definitions in schema.printed.graphql.

  4. Add, modify, or rename any files or directories in /schema and repeat workflow.

Scripts

You can print the result of the schema augmentation process from either neo4j-graphql library using the following scripts which use the gql cli locally:

  • npm run print:neo4j-graphql-js
  • npm run print:neo4j-graphql

All other dependencies are used for building and running the server startup files with the following scripts:

  • npm run start:neo4j-graphql-js
  • npm run start:neo4j-graphql

Roadmap