Skip to content

Commit

Permalink
fix(graphiql): standardise on 'change' event (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored Mar 29, 2018
1 parent bfe1a86 commit 95d36e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/postgraphile/graphiql/src/components/PostGraphiQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PostGraphiQL extends React.Component {

// When we get a change notification, we want to update our schema.
eventSource.addEventListener(
'changed',
'change',
() => {
this.updateSchema()
.then(() => console.log('PostGraphile: Schema updated')) // tslint:disable-line no-console
Expand Down
2 changes: 1 addition & 1 deletion src/postgraphile/http/setupServerSentEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function setupServerSentEvents (req, res, options) {
sse('event: open\n\n')

// Setup listeners.
const schemaChangedCb = () => sse('event: changed\ndata: schema\n\n')
const schemaChangedCb = () => sse('event: change\ndata: schema\n\n')

if (options.watchPg)
_emitter.on('schemas:changed', schemaChangedCb)
Expand Down

0 comments on commit 95d36e0

Please sign in to comment.