Giter VIP home page Giter VIP logo

Comments (3)

leebyron avatar leebyron commented on May 3, 2024

is supposed to be a reference implementation for GraphQL HTTP server authors or is this supposed to be the resource for building production grade HTTP GraphQL servers with GraphQL JS.

Definitely yes to the first. This is a reference implementation of how a GraphQL HTTP server should operate, that is the primary goal.

Usually yes to the second, but deferring to the primary goal of being a reference implementation should a change trade-off between the two.

If you're building a node service with graphql-js, then this service should enable your production traffic in the large majority of cases.

from express-graphql.

leebyron avatar leebyron commented on May 3, 2024

Remove the express dependency. This module could easily be just a connect-style middleware which could then work with express, connect, router, and koa (off the top of my head). This might warrant a module name change to graphql-http or something.

I like this. I think this was just short-sighted on my own part, since I didn't realize these server modules all shared the same middleware API. This should probably be called graphql-http-middleware or something like that. Removing the peer-dep for express seems totally acceptable.

Query cache for production. These queries would be pre-parsed/pre-validated and they would be referenced using their operation name by a client.

@alangenfeld has been thinking about how to add that to this repo in a way that is generic to how you actually want to cache those things. Once we have that we should include examples of how to use it.

By default add an extra validation rule to prevent malicious queries (could be implemented in another module and imported).

I don't agree with this one because there's an open question as to what qualifies as a malicious query and there are many strategies for dealing with it. I do think having a clear example of how to use the extra validationRules option for providing a malicious query checker would be valuable though.

from express-graphql.

leebyron avatar leebyron commented on May 3, 2024

Closing this issue, but feel free to keep discussion up here.

from express-graphql.

Related Issues (20)

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.