Skip to content

Commit 8bc0174

Browse files
committed
Add python and js to README to allow syntax highlighting
1 parent 9142bed commit 8bc0174

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $ pip install graphql-subscriptions
5353

5454

5555
example:
56-
```
56+
```python
5757
def new_user(**kwargs):
5858
args = kwargs.get('args')
5959
return {
@@ -91,7 +91,7 @@ $ pip install graphql-subscriptions
9191
## Example Usage
9292
#### Server (using Flask and Flask-Sockets):
9393

94-
```
94+
```python
9595
from flask import Flask
9696
from flask_sqlalchemy import SQLAlchemy
9797
from flask_sockets import Sockets
@@ -142,7 +142,7 @@ if __name__ == "__main__":
142142
Of course on the server you have to "publish" each time you have a mutation (in this case to a redis channel). That would look something like this (using graphene / sql-alchemy):
143143

144144

145-
```
145+
```python
146146
class AddUser(graphene.ClientIDMutation):
147147

148148
class Input:
@@ -181,7 +181,7 @@ class Subscription(graphene.ObjectType):
181181
#### Client (using Apollo Client library):
182182
First create create network interface and and client instances and
183183
then wrap them in a subscription client instance
184-
```
184+
```js
185185
import ReactDOM from 'react-dom'
186186
import { ApolloProvider } from 'react-apollo'
187187
import ApolloClient, { createNetworkInterface } from 'apollo-client'
@@ -216,7 +216,7 @@ ReactDOM.render(
216216
```
217217
Build a simple component and then call subscribeToMore method on the
218218
returned data object from the inital graphql query
219-
```
219+
```js
220220

221221
import React from 'react'
222222
import { graphql } from 'react-apollo'

0 commit comments

Comments
 (0)