Code Monkey home page Code Monkey logo

Comments (8)

schickling avatar schickling commented on July 4, 2024 1

I really like this idea! We'll try to prioritize this and come up with a first mockup over the next few weeks.

Would be great to hear other people's thoughts and ideas on this as well! ๐Ÿ™

from graphql-yoga.

kbrandwijk avatar kbrandwijk commented on July 4, 2024 1

I've been playing around some more with this idea. This is what I've got so far:

  • Whenever you call a delegate in graphcool-binding, the path to the current node and the delegate that is called is saved on the context
  • A custom formatResponse function is used on apollo-server to access that information from the context, and put it in an extensions object.
  • The updated extension object looks something like:
bindings: [
  { 
    "path": ["post, "comments"],
    "binding": {
      "name": "mydatasource",
      "endpoint": "http://api.graph.cool/mydatasource/dev",
      "path": ["query", "comments"]
    }
  }
]

from graphql-yoga.

schickling avatar schickling commented on July 4, 2024 1

This is really awesome @kbrandwijk. Let's see whether we can collaborate with the folks @apollographql on this, as this looks similar to the GraphQL tracing extension.

from graphql-yoga.

kbrandwijk avatar kbrandwijk commented on July 4, 2024

Yes, I took inspiration from that. I am already discussing this with them, because currently apollo-server has 2 hardcoded extensions and no way to specify another. Tooling is very limited there, the only place to do it is formatResponse, but doing this 'under the covers' means being extra careful about how to wrap this when the user also specifies it's own formatResponse.

See: apollographql/apollo-server#657 (comment)

from graphql-yoga.

stale avatar stale commented on July 4, 2024

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

from graphql-yoga.

stale avatar stale commented on July 4, 2024

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

from graphql-yoga.

stale avatar stale commented on July 4, 2024

Hey ๐Ÿ‘‹, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. ๐Ÿ™‚

from graphql-yoga.

Urigo avatar Urigo commented on July 4, 2024

Hey, @Urigo from The Guild here!

You might know us from projects such as graphql-code-generator, envelop or graphql-tools.

For a long time we thought that the Javascript ecosystem is still missing a lightweight cross-platform, but still highly customizable GraphQL Server.

In the past the awesome Prisma team took on that great challenge and now we are happy to announce that we are continuing them and just released GraphQL Yoga 2.0 - Build fast, extensible, and batteries-included (Subscriptions, Serverless, File uploads support) GraphQL APIs in Node.js ๐Ÿš€

We have been working a long time on version 2.0 and have been using it in our clients projects for a few months now and shared a couple of alpha cycles here.
Thank you all for your feedback and suggestions, you made this release possible!

Please try Yoga out again, give us feedback and help us spread the word on the new release!

from graphql-yoga.

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.