Giter VIP home page Giter VIP logo

Comments (11)

rricard avatar rricard commented on April 23, 2024 3

@helfer yes, sorry, forgot a bit about it! I have a lot to do currently (mainly client stuff, that's why the PRs are going there... 😉 ) but yes, I still plan doing that at some point! I'll tell you then when I do it if you can help me!

from apollo-server.

helfer avatar helfer commented on April 23, 2024 1

@rricard Yeah, that's a great idea. If you add tests, that will also be a great way to point to concrete examples for how to use it.

from apollo-server.

rricard avatar rricard commented on April 23, 2024 1

@helfer I've got great news! I finally tried to run apollo-server on restify: it works perfectly 🎉 . So the idea now is to write tests to ensure we don't break compat with restify, I'll work on that myself. I'll also write some docs on how to integrate w/ restify!

from apollo-server.

helfer avatar helfer commented on April 23, 2024

@rricard Yes, I'm definitely for adding support for Restify! But at the moment I'm having a bit of trouble seeing how you would integrate it tightly with Apollo Server? Would you just use it as an alternative to Express, HAPI, Koa, etc?

Is the idea to essentially use Restify as a backend and automatically generate resolvers or a schema somehow?

If you have an example for how you integrated express-graphql in Restify and what you would like the integration to look like in an ideal world, that would be great!

from apollo-server.

rricard avatar rricard commented on April 23, 2024

The main issue with restify is it can't live with express in the same codebase since both override stuff globally. We need our graphql schema in the same codebase ...

Right now it looks like that:

const graphqlHTTP = require('express-graphql');

const graphQLEndpoint = graphqlHTTP(...);

app.get('/graphql', graphQLEndpoint);
app.post('/graphql', graphQLEndpoint);

It works but I think we could do better!

from apollo-server.

rricard avatar rricard commented on April 23, 2024

For instance we could define the graphql endpoint as a middleware. I'll try to think of a correct API and propose that to you!

from apollo-server.

stubailo avatar stubailo commented on April 23, 2024

@rricard can't you use Apollo Server the same way? http://docs.apollostack.com/apollo-server/setup.html#apolloExpress

from apollo-server.

rricard avatar rricard commented on April 23, 2024

Last time I checked, it failed with some restify internals (not express graphql). At least if we want to go that way and use restify via the express support, tests should be added to ensure restify is not broken. I should start with that...

from apollo-server.

helfer avatar helfer commented on April 23, 2024

@rricard are you still interested in this? I think it would be pretty useful! Let me know if I can help in any way.

from apollo-server.

rricard avatar rricard commented on April 23, 2024

Closing in favor of #125

from apollo-server.

stubailo avatar stubailo commented on April 23, 2024

Thank for looking into this!

from apollo-server.

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.