• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimalistic GraphQL framework

Exoframe

Graffiti.js is a minimalistic GraphQL framework

How to use

Install it:

$ npm install graffiti --save

After that, the file-system is the main API. Every .js file becomes a schema definition that gets automatically processed and converted to GraphQL API.

Populate ./schema/note.js inside your project:

// export new Mongoose.js schema definition
exports.schema = {
  name: String,
  body: String,
  // NOTE: Mongoose model names will always be capitalized versions of your filenames
  group: { type: 'ObjectId', ref: 'Collection' },
};

and /schema/collection.js:

exports.schema = {
  name: String,
};

and then just run graffiti dev and go to http://localhost:3000/playground

So far, you get:

  • Automatic creation of GraphQL APIs
  • Automatic relations between types (when using ObjectId as type)
  • Access to GraphQL playground (in development mode)
  • Way to add manual resolvers or GraphQL methods
  • Way to setup manual complex relations
  • Automatic app reload on schema changes (in development mode)
  • Extensibility via third-party plugins

Requirements

Graffiti assumes you have:

  • MongoDB v4.0+ (easiest way is to start one using docker: docker run --name mongodb -p 27017:27017 -d mongo)
  • Node.js v14.8+

How it works

Graffiti.js is built on top of fastify, graphql-compose and Mongoose.
Graffiti is heavily inspired by awesome Next.js and is mostly there to remove the need to write boilerplate code yourself.

You can find detailed documentation in ./docs folder.

You can also find more examples in ./examples folder.

Special thanks

A huge thank you to:

More Repositories

1

outstated

Simple hooks-based state management for React
JavaScript
107
star
2

microwork

Microwork - simple creation of distributed scalable microservices in node.js with RabbitMQ
JavaScript
97
star
3

rxstate

Simple opinionated state management library based on RxJS
JavaScript
50
star
4

generator-powder

Powder.js Yeoman generator
JavaScript
41
star
5

node-docker-pkg-demo

Demo of using Docker multi-stage builds with Zeit pkg to build small node-based images
JavaScript
14
star
6

postal.observe

A postal.js plugin that provides a way to get a subscription as Rx.Observable
JavaScript
9
star
7

reddmix

Remix-based Reddit client
TypeScript
8
star
8

particula

Zero-config Express.js Framework
JavaScript
8
star
9

microcore

Core library for simple creation of pipelinening microservices in Node.js with RabbitMQ
JavaScript
7
star
10

Steamgifts-Chrome-Extensions

Steamgifts.com new giveaways notifier for Chrome
HTML
6
star
11

youtube-control

Simple extensions for viewing YouTube subscriptions as lists (Youtube Video Deck alternative)
JavaScript
6
star
12

feedly-colorful-list-view

Tiny userscript that colorizes Feedly news entries by source.
JavaScript
5
star
13

rethinkdb-pubsub

Implementation of message queueing on top of RethinkDB changefeeds as a library
JavaScript
5
star
14

superagent-rx

A plugin for superagent that allows getting results as Rx.Observable
JavaScript
4
star
15

shard

Shard community platform
JavaScript
4
star
16

libcodezen

Adobe AIR, flex, as3 classes and components library
ActionScript
4
star
17

gsmCharacteristics

gsmCharacteristics parsing and transforming project
JavaScript
3
star
18

yamalight

My Profile Readme
3
star
19

HumblePlayer

HumblePlayer - music player for your HumbleBundle soundtracks
JavaScript
3
star
20

warframe-alert-tg-bot

Simple Telegram bot for warframe that will notify you about interesting items in alerts and invasions
JavaScript
3
star
21

particula-core-fastify

Fastify.js core for Particula
JavaScript
3
star
22

actions-mongo-test

Basic test of importing dump into mongodb in github actions
2
star
23

gatsby-mdx-bug-demo

Simple demo for MDX graphql issue
CSS
2
star
24

particula-plugin-next

Particula plugin that adds Next.js integration
JavaScript
2
star
25

MobilePOIStudentProject

JavaScript
1
star
26

presentation-asyncjs

Presentation on working with asynchronous javascript (promises, async/await, functional programming, reactive programming)
CSS
1
star
27

treeofsavior-translatehelper

Tree of Savior - Translation Helper app
JavaScript
1
star
28

gaming-knowledge-graph

Building a gaming knowledge graph
JavaScript
1
star