Code Monkey home page Code Monkey logo

fractal6-schema's Introduction

Fractale Schema

This repository has been merged in https://github.com/fractal6/fractal6.go

This repo contains the core schema of the project and the binary gqlast.py that parses and generates GraphQL files from source schema to feed the libraries in use such as gqlgen, elm-graphql and dgraph.

Commands

Build the parser (to use to reflect the graphql grammar changes)

make parser

Generate the source schema to feed Dgraph from the intial graphql files (types and directives).

make dgraph

Generate the source schema to feed gqlgen (require the output schema auto-generated by dgraph (gen_dgraph_out/schema.graphql)

make schema # or make gqlgen_in

Input schema

User defined schemas are located into the directory graphql/:

GraphQL applications

The graphql/ directory contains the schema source for all other schemas which are used to generated valid GraphQL scheme for the following applications:

  • dgraph (almost native GraphQL support):
    • remove custom directives and comments.
    • types that implements interface cant redefined fields/edges -> Only the interface field are kept because there are supposed to be more flexible.
  • gqlgen and elm-graphql (GraphQL support): dgraph schema is used to provide gqlgen and elm-graphql with custom rational:
    • types that implement interfaces need to inherit the fields of the mother interface (not needed for dgraph).
    • change interface to type to simplify gqlgen implementation.
    • input directives (@alter_* and @patch_* directives) are moved to the input type generated by dgraph
    • dgraph type arguments are copied into the original type if they don't exist.
    • manage duplicated types definition (since dgraph generated schema redefined types)

Output directories

The generator output files in the following directories:

  • gen/: Schema used by fractal6.go (glqgen) and fractal6-ui.elm (elm-graphql) with custom schema from dgraph introspection.
  • gen_dgraph_in/: the schema use to alter the dgraph database.
  • gen_dgraph_out/: the schema generated by dgraph, with automatic queries, mutations and inputs generated.

Other directories:

  • gram/: The grammar file needed to build the GraphQL parser (see make parser).
  • graphql/: User defined schemas.

fractal6-schema's People

Contributors

dtrckd avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dtrckd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.