Code Monkey home page Code Monkey logo

graphqlrc's Introduction

graphqlrc

Idea: a file you can put in the root of your repository to configure various GraphQL tools

graphqlrc's People

Stargazers

Mike Tobia avatar Hongbo Miao avatar Tim Mikeladze avatar Martin Høst Normark avatar Loren ☺️ avatar ΘLΞG avatar Johannes Schickling avatar

Watchers

Geoff Schmidt avatar ΘLΞG avatar Sashko Stubailo avatar James Cloos avatar Omri Klinger avatar Hyo Jeong avatar  avatar

graphqlrc's Issues

Support dynamic schemas

As we discussed in ardatan/graphql-tools#40 we need to support dynamic schemas—where “dynamic” here means that the schema is determined on server start by composing various modifiers in different files and modules, as opposed to a static schema.gql file.

A solution to handle these dynamic servers, would be to set up a shell command that would return an introspection JSON. That command would usually be something like:

{
    "generateSchema": "node tools/generateSchema.js"
}

But then we have this cache invalidation issue that I’m not sure how to solve. I imagine something like a --watch mode could work, but would make it hard for developers to write a script that would not only return the schema but also communicate futures changes through some sort of watch protocol. Though maybe utility libraries could help and make this whole idea feasible.

Another solution would be to actually launch the GraphQL server and have things like linters and autocompletion be checked against this running server, such as if the server gets restarted with a different config, it will return different responses to linter/autocompletion introspection queries and thus we will avoid any cache invalidation issue. The drawback here is that the tooling wouldn’t work without launching the server but maybe that’s still the best thing to do considering that we need to run a command anyway—and if we imagine autocompletion for a SQL database, having that database running in the background makes sense, so I guess the same reasoning apply to a GraphQL server.

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.