Giter VIP home page Giter VIP logo

mullholland's People

Contributors

schicks avatar

Watchers

 avatar

mullholland's Issues

subpackages

As the project progresses there are going to be several independent modules that should be organized into a monorepo.

  • core; main functionality, package that supports type safe gql queries
  • codegen; plugin / sample config for graphql codegen that will generate the graph type we need (#1)
  • example; package with simple sample graphql server showing how to make queries

Definition of done; reorganize current functionality into a core package and document how depending on other packages should work

mutation sequencing

in graphql, mutations run in the order that they appear in the SDL document. This is often significant for server side operations, but cannot be expressed by a single selector.

Definition of done: add a chain function that takes an array of selectors and guarantees that they will be serialized in order. The result type should be the intersection of the selector array.

example package

once we have a monorepo (#3) we are going to want to add a subpackage that shows how this works in a sample project.

Definition of done: a sample subpackage that implements a simple graphql server and shows usage of core to make type safe queries in a simple react app.

Graph code generation

The goal of mullholland is to avoid code generation on the client side, but we still need a type representing the graph as a whole in order to infer the results of queries. graphql codegen can do this for us, but the shape that we need is slightly different than the usual so we may need to write our own plugin to support this.

definition of done: a sample graphql codegen config that generates Query and Mutation types in the form that we need. e.g.;

type Query = {
  getUser: (args: {id: string}) => User // properties with arguments should be functions from an args object to the result
}

If the codegen requires a new plugin, that plugin should be added as a package to this repo.

SDL generation

Currently the code as it exists mostly handles inferring the appropriate types. We also need a function serializeSelector that, given a selector object, produces the SDL string for that selector.

Definition of Done: write and test the serializeSelector function.

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.