neo4j-graphql-skill

Build and secure a GraphQL API backed by Neo4j using the @neo4j/graphql library.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/eklyukin/my-ai-config --skill neo4j-graphql-skill-eklyukin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neo4j-graphql-skill
Source: https://github.com/eklyukin/my-ai-config/tree/main/skills/neo4j-graphql-skill
Command: npx skills add https://github.com/eklyukin/my-ai-config --skill neo4j-graphql-skill-eklyukin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @neo4j/graphql, neo4j-driver, graphql, @apollo/server, @neo4j/graphql-ogm.

What problem does it solve? Writing a GraphQL API on top of a Neo4j graph database requires mastering many library-specific directives, version differences, and security patterns. This Skill guides an agent through the correct @neo4j/graphql v7 (or v5 LTS) syntax so type definitions, relationships, custom resolvers, and authorization rules work on the first attempt. ## Core Features & Use Cases - Schema and Directive Authoring: Write type definitions with @node, @relationship (IN/OUT/UNDIRECTED), @cypher custom resolvers, @id, @timestamp, and @alias, including relationship properties via the Connection API. - Security Configuration: Set up JWT or JWKS-based @authentication and @authorization rules, choosing deliberately between filter (silent hiding) and validate (thrown errors). - OGM and Subscriptions: Use the OGM for trusted server-side programmatic access and enable CDC-backed subscriptions for real-time events. - Use Case: You are wiring Neo4j to Apollo Server and need auto-generated queries and mutations, JWT-secured fields, and a v6-to-v7 migration path with a checklist of common errors like missing @node or mismatched @cypher columnName. ## Quick Start Ask the agent to create a Neo4j-backed GraphQL API with Apollo Server, defining Movie and Person types with an ACTED_IN relationship and JWT-based authorization.

Frequently Asked Questions about neo4j-graphql-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GraphQL API from a Neo4j database?▼

Install @neo4j/graphql, neo4j-driver, graphql, and @apollo/server, then pass typeDefs and a Neo4j driver to the Neo4jGraphQL constructor. Call getSchema() and hand it to ApolloServer to get auto-generated queries and mutations for every @node type.

How do I secure Neo4j GraphQL fields with JWT?▼

Configure features.authorization.key with a JWT secret or JWKS URL in the Neo4jGraphQL constructor, then pass the token via the Apollo context function. Apply @authentication and @authorization directives on types, choosing filter to silently hide data or validate to throw errors.

What changed in @neo4j/graphql v7 vs v6?▼

v7 requires @node on every node type, replaces the options wrapper with direct limit and sort args, mandates explicit eq in filters, and removes connectOrCreate, @private, and @unique. Single relationship fields must become lists, and directed query args move to queryDirection in @relationship.

Why does my @cypher field return null in Neo4j GraphQL?▼

The columnName argument must exactly match the RETURN alias in your Cypher statement; a mismatch silently returns null. Also verify that parameters are referenced as $paramName and that this refers to the current node in field-level @cypher.

When should I use OGM instead of the Neo4j GraphQL API?▼

Use the OGM from @neo4j/graphql-ogm for trusted server-side programmatic access, since it bypasses GraphQL authorization rules. Call await ogm.init() before using ogm.model() for find, create, update, and delete operations.

Does @neo4j/graphql support subscriptions?▼

Yes, but subscriptions require Neo4j CDC enabled in FULL mode and features.subscriptions set to true in the constructor. The library then auto-generates created, updated, and deleted subscription fields for each @node type.