All Release Notes
Added Subscription GraphQL query and mutation schema
8 April 2020
Enhancement
GraphQLMessages
Subscriptions can now be queried, created, updated, and deleted using the GraphQL API.
- [GraphQL API] Added the following types to the GraphQL schema:
AzureServiceBusDestination,AzureServiceBusDestinationInput,ChangeSubscription,ChangeSubscriptionDestination,ChangeSubscriptionInput,CloudEventsSubscriptionsFormat,CloudEventsSubscriptionsFormatInput,Destination,DestinationInput,EventGridDestination,EventGridDestinationInput,GoogleCloudPubSubDestination,GoogleCloudPubSubDestinationInput,MessageSubscription,MessageSubscriptionInput,NotificationFormat,PlatformFormat,PlatformFormatInput,SNSDestination,SNSDestinationInput,SQSDestination,SQSDestinationInput,SetSubscriptionChanges,SetSubscriptionKey,SetSubscriptionMessages,Subscription,SubscriptionDraft,SubscriptionFormatInput,SubscriptionHealthStatus,SubscriptionQueryResult,SubscriptionUpdateAction. - [GraphQL API] Changed the
Querytype:- Added the
subscriptionfield to theQuerytype. - Added the
subscriptionsfield to theQuerytype.
- Added the
- [GraphQL API] Changed the
Mutationtype:- Added the
updateSubscriptionfield to theMutationtype. - Added the
deleteSubscriptionfield to theMutationtype. - Added the
createSubscriptionfield to theMutationtype.
- Added the
Introduced the following changes to the GraphQL schema (in SDL format):
extend type Query {subscription("Queries with specified ID"id: String,"Queries with specified key"key: String): Subscriptionsubscriptions(where: String, sort: [String!], limit: Int, offset: Int): SubscriptionQueryResult!}extend type Mutation {createSubscription(draft: SubscriptionDraft!): SubscriptiondeleteSubscription(version: Long!,"Queries with specified ID"id: String,"Queries with specified key"key: String): SubscriptionupdateSubscription(version: Long!, actions: [SubscriptionUpdateAction!]!,"Queries with specified ID"id: String,"Queries with specified key"key: String): Subscription}type AzureServiceBusDestination implements Destination {connectionString: String!type: String!}input AzureServiceBusDestinationInput {connectionString: String!}type ChangeSubscription {resourceTypeId: String!}input ChangeSubscriptionDestination {destination: DestinationInput!}input ChangeSubscriptionInput {resourceTypeId: String!}type CloudEventsSubscriptionsFormat implements NotificationFormat {type: String!cloudEventsVersion: String!}input CloudEventsSubscriptionsFormatInput {cloudEventsVersion: String!}interface Destination {type: String!}input DestinationInput {SQS: SQSDestinationInputSNS: SNSDestinationInputAzureServiceBus: AzureServiceBusDestinationInputEventGrid: EventGridDestinationInputGoogleCloudPubSub: GoogleCloudPubSubDestinationInput}type EventGridDestination implements Destination {uri: String!accessKey: String!type: String!}input EventGridDestinationInput {uri: String!accessKey: String!}type GoogleCloudPubSubDestination implements Destination {projectId: String!topic: String!type: String!}input GoogleCloudPubSubDestinationInput {projectId: String!topic: String!}type MessageSubscription {resourceTypeId: String!types: [String!]!}input MessageSubscriptionInput {resourceTypeId: String!types: [String!]}interface NotificationFormat {type: String!}type PlatformFormat implements NotificationFormat {type: String!}input PlatformFormatInput {dummy: String}type SNSDestination implements Destination {topicArn: String!accessKey: String!accessSecret: String!type: String!}input SNSDestinationInput {topicArn: String!accessKey: String!accessSecret: String!}type SQSDestination implements Destination {queueUrl: String!accessKey: String!accessSecret: String!region: String!type: String!}input SQSDestinationInput {queueUrl: String!accessKey: String!accessSecret: String!region: String!}input SetSubscriptionChanges {changes: [ChangeSubscriptionInput!]!}input SetSubscriptionKey {key: String}input SetSubscriptionMessages {messages: [MessageSubscriptionInput!]!}type Subscription implements Versioned {key: Stringdestination: Destination!messages: [MessageSubscription!]!changes: [ChangeSubscription!]!format: NotificationFormat!status: SubscriptionHealthStatus!id: String!version: Long!createdAt: DateTime!lastModifiedAt: DateTime!createdBy: InitiatorlastModifiedBy: Initiator}input SubscriptionDraft {key: Stringdestination: DestinationInput!messages: [MessageSubscriptionInput!]changes: [ChangeSubscriptionInput!]format: SubscriptionFormatInput}input SubscriptionFormatInput {Platform: PlatformFormatInputCloudEvents: CloudEventsSubscriptionsFormatInput}enum SubscriptionHealthStatus {TemporaryErrorConfigurationErrorDeliveryStoppedConfigurationErrorHealthy}type SubscriptionQueryResult {offset: Int!count: Int!total: Long!results: [Subscription!]!}input SubscriptionUpdateAction {changeDestination: ChangeSubscriptionDestinationsetChanges: SetSubscriptionChangessetKey: SetSubscriptionKeysetMessages: SetSubscriptionMessages}