Response JSON:
{
"errors": [
{
"message": "Unknown argument 'conversationId' on field 'User.conversations'. Did you mean 'nConversations'?",
"locations": [
{
"line": 3,
"column": 53
}
]
}
]
}
The error looks to be in here:
|
const GET_MESSAGE = gql` |
|
query MessagesByConversation( |
|
$conversationId: Int! |
|
$nMessages: Int! |
|
$token: String! |
|
$offset: Int! |
|
) { |
|
me(token: $token) { |
|
conversations( |
|
nConversations: 1 |
|
token: $token |
|
conversationId: $conversationId |
|
) { |
|
id |
|
messages(nMessages: $nMessages, offset: $offset) { |
|
sender { |
|
username |
|
} |
|
timestamp |
|
revision |
|
content |
|
} |
|
} |
|
} |
|
} |
|
`; |
We just missed an endpoint in the API, I'll add that now, but the correct way to do this when it's ready is:
query MessagesByConversation(
$conversationId: Int!
$nMessages: Int!
$token: String!
$offset: Int!
) {
conversation(conversationId: $conversationId, token: $token) {
id
messages(nMessages: $nMessages, offset: $offset) {
sender {
username
}
timestamp
revision
content
}
}
}
Response JSON:
{ "errors": [ { "message": "Unknown argument 'conversationId' on field 'User.conversations'. Did you mean 'nConversations'?", "locations": [ { "line": 3, "column": 53 } ] } ] }The error looks to be in here:
client-web/src/components/ChatMessageView.jsx
Lines 17 to 42 in 2edb909
We just missed an endpoint in the API, I'll add that now, but the correct way to do this when it's ready is: