django-graphql-apollo-react-demo
django-graphql-apollo-react-demo copied to clipboard
Code for a workshop about my Django, GraphQL, ReactJS, Apollo-stack
Following your code, I got some error when implementing JWT middleware. after inserting backend.middleware.JWTMiddleware', The issue is my middleware is MIDDLEWARE = [ [...] 'backend.middleware.JWTMiddleware', [...] I found that **MIDDLEWARE**...
``` urlpatterns = [ url(r'^gql', csrf_exempt(GraphQLView.as_view(batch=True))), ] ``` This issue has been reported earlier, with a fix, but it is not in master: [#105](https://github.com/graphql-python/graphene-django/pull/105) so how can I change my...
In the test_schema.py from simple_app should be: res = q.resolve_message({'id': id}, None, None) instead of res = q.resolve_messages({'id': id}, None, None)
something like this: ``` class ProductSizeType(DjangoObjectType): class Meta: model = models.ProductSize interfaces = (graphene.Node, ) local_fields = { 'pk': graphene.Field(graphene.Int), } def resolve_pk(self, args, context, info): return self.pk ```
Something like this: ``` from graphene.test import Client c = Client(root_schema) resp = c.execute(''' { allSizesForProduct(productPk: 1) { pk, inCm } } ''') res = resp['data']['allSizesForProduct'][0] self.assertEqual(res['pk'], 1, msg=( 'Should...
Thank you @mbrochh for the introduction to the GraphQL stack at the [Djangonauts meetup](https://www.meetup.com/Singapore-Djangonauts/events/240608776/). Kudos to the well prepared presentation and sample codes. I have a few thoughts and suggestions...