Giter VIP home page Giter VIP logo

graphql-binary's People

Contributors

dependabot[bot] avatar esseswann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

graphql-binary's Issues

Referencing variables

Variables should be encoded the same way arguments do with reference to InputTypes
We disallow JSON arguments as it is dangerous unoptimizable practice.
Variables should probably be stored in an flat array which indices we point to from queries.
For traffic reduction we should probably calculate actual offset on the flight, so we reach the end of the query and start reading length headers until we reach required index

Support mutations encoding\decoding

We should probably add a top level byte which describes several states

  • Query
  • Mutation
  • Fragment
  • Subscription
  • Query with variables
  • Mutation with variables
  • Subscription with variables

Some 249 more variations might apply

Write a specification

I wanna try it in python, but I don't want to reverse-engineer it from the code.

Could you please write a specification? And it's better to do it in Kaitai Struct (so we get a parser for the format for a lot of languages for free).

Extendable types

There should be an easy way to override\add new type encoding\decoding definitions

Strings should support variable header length

Considering that we have string encoding structure of this kind
[header, body]
and currently header is 1 byte which limits us to 255 bytes long string.
Similar to msgpack string size header should work like this:

  • If first byte is 255 we read the next byte into header. Else read header as a 8-bit integer
  • If second byte is 255 we read next byte into header. Else read header as a 16-bit integer
  • If third byte is 255 we read next byte into header. Else read header as a 24-bit integer
  • Reach max header length of 4 bytes. Read header as a 32-bit integer

Example in msgpack
Might be reasonable to directly reference msgpack implementation

GQLB proxy

There should be a containerized proxy that would automatically encode\decode data between client and actual GraphQL server using introspection
A visible problem is that some GraphQL servers limit the introspection schema to current user permissions

Apollo Link

A custom Apollo Link using gqlb should be created for easy integration
Correspondingly a server side solution must be provided, apollo-server-express middleware maybe?

subscription-transport-ws allows passing a string in query but it won't be properly encoded, and Base64 ruins whole purpose of this lib hence adding a link to link chain might not be sufficient and rewriting the ws link is required

Array response

Currently we're not encoding and decoding the data in arrays. We should use recursive algorithms and length headers similar to String

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.