Skip to content
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

Graphql support #586

Open
birukbelay opened this issue Sep 22, 2024 · 1 comment
Open

Graphql support #586

birukbelay opened this issue Sep 22, 2024 · 1 comment
Labels
question Further information is requested

Comments

@birukbelay
Copy link

birukbelay commented Sep 22, 2024

There are no active graphql libraries in golang supporting struct first approach, there was thunder but it is now archived, and from the way huma is built i think it will be able to support graphql, because it defines request's and response's as a struct already.

@danielgtaylor
Copy link
Owner

@birukbelay Huma v1 actually had some basic GraphQL support built-in, but it was difficult to maintain and rather complex code. I'm happy to have someone build a library on top of Huma (and I'll expose anything needed to do so) to add GraphQL support, but for v2 I'm not going to implement this myself. I'm trying to keep Huma small, simple, fast, and maintainable (which is already quite difficult). Happy to work with someone if they want to try to build it.

In the meantime, something like https://www.npmjs.com/package/openapi-to-graphql can be used to generate GraphQL schema and convert GraphQL requests to plain REST, giving you a quick way to slap some GraphQL support in front of your API.

@danielgtaylor danielgtaylor added the question Further information is requested label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants