Extend the Resolver type in the sync-ui schema (https://github.com/aerogear/data-sync-ui/blob/master/server/gql/schema.js) with a field publish similar to the sync server (https://github.com/aerogear/data-sync-server/blob/master/sequelize/models/resolver.js).
Additionally a new model has to be created for the Subscription itself, similar to this one on the sync-server: https://github.com/aerogear/data-sync-server/blob/master/sequelize/models/subscription.js
When a mutation is saved the name of the following things should happen:
# The selected subscription should be stored there saved in the 'publish' field of the Resolver (as a string) # Check if a subscription instance (of the subscription model) already exists for this subscription . If yes, do nothing. If no, create one and set the field and schemaId to the correct values. |
|