For this first guide we're going to create a comment on a project in an Altium 365 (A365) workspace using Banana Cake Pop (BCP).
Using voyager and looking at the "Mutation" page, you can see a list of possible mutations. "desCreateComment" is the top one which we can use. Clicking into it there are details on the inputs it takes as shown below.
Note: If a field has an exclamation mark (!) at the end it is a mandatory input.
So, to create a comment you need an "entityId", "commentThreadId" and "text". "entityId" is the id of the project we are going to create a comment in. To find these we use some other queries.
entityId:
query projectId{ desProjects( workspaceUrl: "YourWorkspaceUrlHere" ){ nodes{ id name projectId } } }
Your can find your workspace URL by copying up until .com/ when you're in your workspace in your preferred browser. You can also do it using the API by using the below query:
query workspaceUrl { desWorkspaces { url name } }
commentThreadId:
query commentThreadId{ desCommentThreads( projectId: "Your Project Id (see note below) Here" ){ comments{ text } commentThreadId } }
Note: You can grab the "projectId" from the "Id" result of the previous query we ran.
Making Comment:
mutation comment{ desCreateComment (input: { entityId: "YourProjectIdHere", commentThreadId: "YourCommentThreadIdHere", text: "YourCommentHere" }){ commentId } }
Almost instantaneously you should see the comment appear.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article