Page tree
Skip to end of metadata
Go to start of metadata

The "conversation" query returns a specific Conversation. The query requires a mandatory attribute for the id of the Conversation to retrieve.

The org.opencode4workspace.builders.ConversationGraphQLQuery class has a simple static helper method, buildStandardConversationQueryById(String). Similar methods are also available from WWClient and WWGraphQLEndpoint.

For greater control, create an ObjectDataSenderBuilder for the Conversation.CONVERSATION_QUERY_OBJECT_NAME object, adding the Conversation id attribute, passing in Conversation fields and children. Instantiate a new ConversationGraphQLQuery passing in the ObjectDataSenderBuilder as the parameter. Then pass this to WWClient.getConversationWithQuery().

Examples

Basic getConversationById
    Conversation conversation = client.getConversationById(conversationId);
    assert (conversation.getMessages().size() > 0);
getConversationWithQuery
    ObjectDataSenderBuilder query = new ObjectDataSenderBuilder();
    query.setObjectName(Conversation.CONVERSATION_QUERY_OBJECT_NAME);
    query.addAttribute(ConversationAttributes.ID, conversationId);
    ObjectDataSenderBuilder messages = new ObjectDataSenderBuilder(ConversationChildren.MESSAGES.getLabel(), true);
    messages.addAttribute(BasicPaginationEnum.FIRST, 10);
    messages.addPageInfo();
    messages.addField(MessageFields.CONTENT_TYPE);
    messages.addField(MessageFields.ANNOTATIONS);
    messages.addChild(new BasicCreatedByUpdatedByDataSenderBuilder(MessageChildren.CREATED_BY));
    messages.addChild(new BasicCreatedByUpdatedByDataSenderBuilder(MessageChildren.UPDATED_BY));
    query.addChild(messages);

	Conversation conversation = client.getConversationWithQuery(new ConversationGraphQLQuery(query));

3 Comments

  1. Anonymous

    Communication is simple, confidence to have a conversation is the elaborate part. What works for me when i'm frightened about having a verbal exchange is to head over it speedy in my mind using visualization, see your self being assured and outgoing and calm whilst speaking to the man or woman, then just look into the people eyes and be that person speakme clearly. assignment square

  2. Anonymous

    If the individual you are conversing with has nothing to state, which can occur, develop an arrangement of themes you can discuss confidentally. Supernatural Blue Jackets The more broadly read you are the more information you will pick up. The conspicuous spot to begin is with things you are keen on yourself.

  3. Anonymous

    On the off chance that your work is encroaching on your fundamental human needs, at that point all things considered, work is going to cause you tension and potentially lead to gloom. Women Leather Jackets For instance, the hours are so long you are commonly drained and run down, there is little security about your activity, the work environment is profoundly serious and so on and so on.

Write a comment…