8000 GitHub - JavaScriptExpert/graphpack at v0.1.0-alpha.0
[go: up one dir, main page]

Skip to content

JavaScriptExpert/graphpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphpack

A minimalistic zero-config GraphQL server

What is included

tbd

Install

With yarn:

yarn add graphpack

With npm:

npm install graphpack

Usage

Add following run script to your package.json:

  "scripts": {
    "start": "graphpack"
  },

Add your type definitions under src/schema.graphql and add some example types in SDL:

type Query {
  hello: String
}

Add your resolvers under src/resolvers.js:

const resolvers = {
  Query: {
    hello: () => 'world!',
  },
};

export default resolvers;

If you prefer to write the type definitions in JS and parse the queries with graphql-tag, just save your schema as a JS file under src/schema.js. It's also possible to create separate folders src/schema/index.js and src/resolvers/index.js.

About

☄️ A minimalistic zero-config GraphQL server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%
0