Developer

What's new in the 22.05.1 (May 13, 2022) Release

  • The v2 listener APIs have been removed.
  • There is a new GraphQL subscription event for the creation of Strokes over surfaces. These surfaces do not return this event when a Stroke is drawn over them: Canvas, Text and Video. All the rest of the surfaces will return this new event when a Stroke is drawn over them.
    • This is an example of a subscription implementation in GraphQL, notice the ... on Stroke {...} block:
      subscription($workspaceId: String!) {  
        item: commands(workspaceId: $workspaceId) {
            __typename
            ... on CreateElementCommand{
                workspaceId
                cursor
                actorId      
                actorType      
                clientId      
                element{        
                    __typename
                    id        
                    ... on Stroke {
                      id        
                      surface {
                        __typename          
                        id        
                      }
                    }    
                }  
            }  
        }
      }
      
      use this variable:
      {
       "workspaceId": "<SET-WORKSPACE-UID>"
      }
      
    • For more details, see our documentation explaining the GraphQL Subscriptions.