All Projects → graphql-nexus → Nexus

graphql-nexus / Nexus

Licence: mit
Code-First, Type-Safe, GraphQL Schema Construction

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Nexus

Graphql Typescript
Define and build GraphQL Schemas using typed classes
Stars: ✭ 67 (-97.54%)
Mutual labels:  graphql, graphql-schema
Graphql Log
Add logging to your GraphQL resolvers so you know what's going on in your app.
Stars: ✭ 94 (-96.55%)
Mutual labels:  graphql, graphql-schema
Snowflaqe
A dotnet CLI tool to work with GraphQL queries: static query verification, type checking and code generating type-safe clients for F# and Fable.
Stars: ✭ 69 (-97.47%)
Mutual labels:  graphql, graphql-schema
Fullstack Graphql
🌈 Simple Fullstack GraphQL Application. API built with Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux to access the API. Written in ES6 using Babel + Webpack.
Stars: ✭ 955 (-64.92%)
Mutual labels:  graphql, graphql-schema
Apollo Server
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Stars: ✭ 12,145 (+346.18%)
Mutual labels:  graphql, graphql-schema
Sql To Graphql Schema Generator
⚛️ Generate GraphQL Scheme Online From SQL Query - https://sql-to-graphql.now.sh/
Stars: ✭ 32 (-98.82%)
Mutual labels:  graphql, graphql-schema
Graphql Transform Schema
Transform, filter & alias resolvers of a GraphQL schema
Stars: ✭ 84 (-96.91%)
Mutual labels:  graphql, graphql-schema
Type Graphql
Create GraphQL schema and resolvers with TypeScript, using classes and decorators!
Stars: ✭ 6,864 (+152.17%)
Mutual labels:  graphql, graphql-schema
Graphbrainz
A fully-featured GraphQL interface for the MusicBrainz API.
Stars: ✭ 130 (-95.22%)
Mutual labels:  graphql, graphql-schema
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (-95.33%)
Mutual labels:  graphql, graphql-schema
Graphql Config
One configuration for all your GraphQL tools (supported by most tools, editors & IDEs)
Stars: ✭ 883 (-67.56%)
Mutual labels:  graphql, graphql-schema
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (-93.35%)
Mutual labels:  graphql, graphql-schema
Strawberry
A new GraphQL library for Python 🍓
Stars: ✭ 891 (-67.27%)
Mutual labels:  graphql, graphql-schema
Graphql Modules
⚠️ [DEPRECATED] GraphQL module library for Apollo.
Stars: ✭ 53 (-98.05%)
Mutual labels:  graphql, graphql-schema
Graphql Code Generator
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
Stars: ✭ 7,993 (+193.64%)
Mutual labels:  graphql, graphql-schema
Graphql Schema Language Cheat Sheet
GraphQL Shorthand Notation Cheat Sheet
Stars: ✭ 1,181 (-56.61%)
Mutual labels:  graphql, graphql-schema
Graphqldesigner.com
A developer web-app tool to rapidly prototype a full stack implementation of GraphQL with React.
Stars: ✭ 587 (-78.43%)
Mutual labels:  graphql, graphql-schema
Graphql
Pure PHP realization of GraphQL protocol
Stars: ✭ 717 (-73.66%)
Mutual labels:  graphql, graphql-schema
Graphql Live Query
Realtime GraphQL Live Queries with JavaScript
Stars: ✭ 112 (-95.89%)
Mutual labels:  graphql, graphql-schema
Graphql S2s
Add GraphQL Schema support for type inheritance, generic typing, metadata decoration. Transpile the enriched GraphQL string schema into the standard string schema understood by graphql.js and the Apollo server client.
Stars: ✭ 171 (-93.72%)
Mutual labels:  graphql, graphql-schema

Nexus

trunk npm version

Declarative, code-first and strongly typed GraphQL schema construction for TypeScript & JavaScript.

Installation

npm install nexus graphql

Note you must also add graphql. Nexus pins to it as a peer dependency.

Features

  • Expressive, declarative API for building schemas
  • Full type-safety for free
  • Powerful plugin system
  • No need to re-declare interface fields per-object
  • Optionally possible to reference types by name (with autocomplete)
    Rather than needing to import every single piece of the schema
  • Interoperable with vanilla graphql-js types, and it's just a GraphQLSchema
    So it fits in just fine with existing community solutions of apollo-server, graphql-middleware, etc.
  • Inline function resolvers
    For when you need to do simple field aliasing
  • Auto-generated graphql SDL schema
    Great for when seeing how any code changes affected the schema
  • DRY-up schema design
    Create higher level "functions" which wrap common fields

Example

import { queryType, stringArg, makeSchema } from 'nexus'
import { GraphQLServer } from 'graphql-yoga'

const Query = queryType({
  definition(t) {
    t.string('hello', {
      args: { name: stringArg() },
      resolve: (parent, { name }) => `Hello ${name || 'World'}!`,
    })
  },
})

const schema = makeSchema({
  types: [Query],
  outputs: {
    schema: __dirname + '/generated/schema.graphql',
    typegen: __dirname + '/generated/typings.ts',
  },
})

const server = new GraphQLServer({
  schema,
})

server.start(() => `Server is running on http://localhost:4000`)

More examples can be found in the /examples directory:

Documentation

You can find the docs for Nexus here.

Migrate from SDL

If you've been following an SDL-first approach to build your GraphQL server and want to see what your code looks like when written with GraphQL Nexus, you can use the SDL converter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].