schicks / mullholland Goto Github PK
View Code? Open in Web Editor NEWA library for creating type safe graphql queries in typescript without code generation
License: MIT License
A library for creating type safe graphql queries in typescript without code generation
License: MIT License
As the project progresses there are going to be several independent modules that should be organized into a monorepo.
Definition of done; reorganize current functionality into a core
package and document how depending on other packages should work
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.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.