-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta attributes are macro quoted? #1024
Comments
Thanks, we're looking into this, it's a similar shaped issue as those we are dealing with in #1023. At the moment, you could sidestep this by using Keyword Lists instead of Maps (since they are represented the same in AST and code) |
Thanks @binaryseed I'll start with keyword lists for now. I'm totally open to feedback as I get started with building. I appreciate the awesome work that has gone into Absinthe and what it has done for our community. |
@mmmries I was also looking at doing something similar but taking the Apollo GraphQL Federated approach rather than schema stitching. Have you looked into this at all? |
@kdawgwilk I only looked into Apollo Federation a little bit. I liked the idea of trying to do this without any additional requirements on my schema. I also checked into graphql-mesh which is a pretty cool project for stitching together APIs into a single graphql gateway. Currently my team is leaning toward graphql-mesh, but I would still love to help out and support the elixir community in having a tool native to our stack. |
Fixed by #1226 |
Environment
Expected behavior
I can use maps, structs or other native data types in the
meta
attributes on a fieldActual behavior
Only simple scalar types seem to work for meta attributes. From the example above when I end up getting in my resolver is
I think this is because the meta attribute has been
quote
d without beingunquote
d.Relevant Schema/Middleware Code
I'm trying to pick up the torch of schema stitching and move it forward for the community.
After reading through some issues it seemed like there was a desire for a community project to add this type of functionality.
I learned what I could from open source examples and started it on trying to build something that was general enough to be re-usable by other teams https://github.com/SpiffInc/absinthe_compose.
I'm interested in tackling this problem because our team at Spiff is wanting to build individual services and provide a unified graphql interface. I would like to keep the unified interface as thin as possible and schema stitching seemed like a great approach.
As I played around with how to approach the problem I liked the idea of being able to mark certain parts of your schema with metadata and then have resolvers automatically create the downstream queries and pull the data back into the local schema. I'm hoping to support arbitrary extensibility by letting people do things like
meta(:proxy_to, {MyClient, [token: some_secret]})
where they can specify a module and pass some "init_args" style configuration. This way they could be calling graphql over some other transport, or using a custom HTTP client etc.#928 seems to have a similar request, but it sounded like there were reasons that the project wanted to keep support for a more limited set of data types that could be passed in the
meta
attributes? I'm happy to change direction on this.The text was updated successfully, but these errors were encountered: