From 41d2cb161836011bb7c52bfa795682ea8f48f5e8 Mon Sep 17 00:00:00 2001 From: luto Date: Tue, 7 Jan 2020 00:23:38 +0100 Subject: [PATCH] add syntax highlighting --- Adding-counts-to-DjangoFilterConnectionField.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adding-counts-to-DjangoFilterConnectionField.md b/Adding-counts-to-DjangoFilterConnectionField.md index 003fb86..e64eea9 100644 --- a/Adding-counts-to-DjangoFilterConnectionField.md +++ b/Adding-counts-to-DjangoFilterConnectionField.md @@ -4,7 +4,7 @@ The trick here is to subclass `Connection` and declare a `connection_class` on y You can now easily implement counts (or really anything) on your extended `Connection` class and use them in your queries, while retaining the built-in filtering that comes with `DjangoFilterConnectionField`: -``` +```python from graphene import ObjectType, Connection, Node, Int from graphene_django import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField @@ -57,7 +57,7 @@ This allows, on this example `schema`, querying: ``` Which returns: -``` +```json { "data": { "places": {