Skip to content

Commit

Permalink
fix(rn): relay graphql event
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy authored and moul committed Mar 22, 2019
1 parent a61650e commit 8b542a7
Show file tree
Hide file tree
Showing 17 changed files with 287 additions and 169 deletions.
22 changes: 19 additions & 3 deletions client/react-native/common/graphql/fragments/Event.js
Expand Up @@ -10,15 +10,31 @@ export default component =>
createdAt
updatedAt
sentAt
seenAt
receivedAt
ackedAt
direction
apiVersion
destinationDeviceId
kind
attributes
conversationId
seenAt
ackStatus
dispatches {
eventId
deviceId
contactId
sentAt
ackedAt
seenAt
ackMedium
seenMedium
}
sourceContactId
targetType
targetAddr
metadata {
key
values
}
}
`
)
14 changes: 7 additions & 7 deletions client/react-native/common/graphql/mutations/ConfigUpdate.js
Expand Up @@ -2,13 +2,13 @@ import { graphql } from 'react-relay'
import { commit } from '../../relay'

const ConfigUpdateMutation = graphql`
mutation ConfigUpdateMutation($pushRelayPubkeyApns: String!, $pushRelayPubkeyFcm: String!, $notificationsEnabled: Bool!, $notificationsPreviews: Bool!, $debugNotificationVerbosity: Enum) {
ConfigUpdate(id: "", myselfId: "", currentDeviceId: "", pushRelayPubkeyApns: $pushRelayPubkeyApns, pushRelayPubkeyFcm: $pushRelayPubkeyFcm, notificationsEnabled: $notificationsEnabled, notificationsPreviews: $notificationsPreviews, debugNotificationVerbosity: $debugNotificationVerbosity) {
id
createdAt
updatedAt
pushRelayPubkeyApns
pushRelayPubkeyFcm
mutation ConfigUpdateMutation($pushRelayPubkeyApns: String!, $pushRelayPubkeyFcm: String!, $notificationsEnabled: Bool!, $notificationsPreviews: Bool!, $debugNotificationVerbosity: Enum) {
ConfigUpdate(id: "", myselfId: "", currentDeviceId: "", pushRelayPubkeyApns: $pushRelayPubkeyApns, pushRelayPubkeyFcm: $pushRelayPubkeyFcm, notificationsEnabled: $notificationsEnabled, notificationsPreviews: $notificationsPreviews, debugNotificationVerbosity: $debugNotificationVerbosity) {
id
createdAt
updatedAt
pushRelayPubkeyApns
pushRelayPubkeyFcm
notificationsEnabled
notificationsPreviews
debugNotificationVerbosity
Expand Down
Expand Up @@ -4,19 +4,19 @@ import { commit } from '../../relay'
import { merge } from '../../helpers'

const ContactAcceptRequestMutation = graphql`
mutation ContactAcceptRequestMutation($contactId: ID!) {
ContactAcceptRequest(contactId: $contactId) {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
mutation ContactAcceptRequestMutation($contactId: ID!) {
ContactAcceptRequest(contactId: $contactId) {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
26 changes: 13 additions & 13 deletions client/react-native/common/graphql/mutations/ContactRequest.js
Expand Up @@ -12,19 +12,19 @@ const ContactRequestMutation = graphql`
ContactRequest(
contactId: $contactId
contactOverrideDisplayName: $contactOverrideDisplayName
introText: $introText
) {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
introText: $introText
) {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
Expand Up @@ -16,15 +16,31 @@ const ConversationAddMessageMutation = graphql`
createdAt
updatedAt
sentAt
seenAt
receivedAt
ackedAt
direction
apiVersion
destinationDeviceId
kind
attributes
conversationId
seenAt
ackStatus
dispatches {
eventId
deviceId
contactId
sentAt
ackedAt
seenAt
ackMedium
seenMedium
}
sourceContactId
targetType
targetAddr
metadata {
key
values
}
}
}
`
Expand Down
48 changes: 24 additions & 24 deletions client/react-native/common/graphql/mutations/ConversationCreate.js
Expand Up @@ -8,30 +8,30 @@ const ConversationCreateMutation = graphql`
$title: String!
$topic: String!
$contacts: [BertyEntityContactInput]
) {
ConversationCreate(title: $title, topic: $topic, contacts: $contacts) {
id
createdAt
updatedAt
title
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
) {
ConversationCreate(title: $title, topic: $topic, contacts: $contacts) {
id
createdAt
updatedAt
title
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
48 changes: 24 additions & 24 deletions client/react-native/common/graphql/mutations/ConversationInvite.js
Expand Up @@ -6,30 +6,30 @@ const ConversationInviteMutation = graphql`
mutation ConversationInviteMutation(
$conversation: BertyEntityConversationInput
$members: [BertyEntityConversationMemberInput]
) {
ConversationInvite(conversation: $conversation, members: $members) {
id
createdAt
updatedAt
title
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
) {
ConversationInvite(conversation: $conversation, members: $members) {
id
createdAt
updatedAt
title
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
36 changes: 18 additions & 18 deletions client/react-native/common/graphql/mutations/ConversationRead.js
Expand Up @@ -8,24 +8,24 @@ const ConversationReadMutation = graphql`
readAt
title
topic
infos
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
infos
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
36 changes: 18 additions & 18 deletions client/react-native/common/graphql/mutations/ConversationRemove.js
Expand Up @@ -7,24 +7,24 @@ const ConversationRemoveMutation = graphql`
id
readAt
title
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
topic
members {
id
createdAt
updatedAt
status
contact {
id
createdAt
updatedAt
sigchain
status
devices {
id
createdAt
updatedAt
name
status
apiVersion
contactId
}
Expand Down
Expand Up @@ -68,5 +68,5 @@ export default context => (input, configs) =>
ConversationUpdateMutation,
'ConversationUpdate',
input,
configs,
configs
)
22 changes: 19 additions & 3 deletions client/react-native/common/graphql/mutations/DebugRequeueEvent.js
Expand Up @@ -10,15 +10,31 @@ const DebugRequeueEventMutation = graphql`
createdAt
updatedAt
sentAt
seenAt
receivedAt
ackedAt
direction
apiVersion
destinationDeviceId
kind
attributes
conversationId
seenAt
ackStatus
dispatches {
eventId
deviceId
contactId
sentAt
ackedAt
seenAt
ackMedium
seenMedium
}
sourceContactId
targetType
targetAddr
metadata {
key
values
}
}
}
`
Expand Down

0 comments on commit 8b542a7

Please sign in to comment.