@webda/graphql

3.8.4 • Public • Published

@webda/graphql

Implements the GraphQL protocol with subscriptions and mutations

// Add a ping to subscription (useful for testing)
setInterval(() => this.emit("Ping", Date.now()), this.parameters.pingInterval);
subscriptions["Ping"] = {
    type: GraphQLLong,
    subscribe: async (source, args, context: any, info: GraphQLResolveInfo) => {
    return new EventIterator(this, "Ping", "Ping", Date.now()).iterate();
    }
};

Readme

Keywords

Package Sidebar

Install

npm i @webda/graphql

Weekly Downloads

17

Version

3.8.4

License

MIT

Unpacked Size

99.9 kB

Total Files

16

Last publish

Collaborators

  • loopingz
  • 8llouch