与Django一起使用REST API的GraphQL包装器
尝试使用Django GraphQl实现现有REST API的包装器。
在JS中发现了类似的,但在Django中没有发现。 https://graphql.org/blog/rest-api-api-graphql-wrapper/ < /a> 任何人都可以建议是否有GraphQl Django包装器进行休息电话。也没有在文档中找到
Trying to implement wrapper for existing REST APIS using Django graphQL.
Found similar one in JS but not in Django.
https://graphql.org/blog/rest-api-graphql-wrapper/
Could anyone please suggest if there is a GraphQL Django wrapper for REST calls. Haven't found in documentation either
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是在谈论使用DRF的REST API吗?我建议您查看 graphene-django-cud 可帮助您进行突变。对于此而言,需要石墨烯 - django,并将有助于您的查询。不幸的是,这不是将所有DRF代码转换为GraphQL的包装器,但是您应该可以基本上复制串行序列化/视图中的大量内容。
Are you talking about a rest API using DRF? I'd suggest you look at graphene-django-cud to help you with mutations. Graphene-django is required for this, and will help with your queries. Unfortunately it's not a wrapper that will convert all your DRF code into graphql, however you should be able to basically copy paste a lot of the content in your serializers/views.