Skip to content

Commit

Permalink
feat(devtools): requeue everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Louvigny committed Nov 9, 2018
1 parent e44e364 commit f60426e
Show file tree
Hide file tree
Showing 10 changed files with 276 additions and 134 deletions.
Expand Up @@ -13,8 +13,9 @@ import {
} from '../../../Library'
import { QueryReducer } from '../../../../relay'
import { colors } from '../../../../constants'
import { fragments, queries } from '../../../../graphql'
import { fragments, mutations, queries } from '../../../../graphql'
import { marginLeft, padding } from '../../../../styles'
import Button from '../../../Library/Button'

const Item = fragments.Event(({ data, navigation }) => (
<TouchableOpacity
Expand Down Expand Up @@ -218,4 +219,8 @@ export const EventListFilterModal = ({ navigation }) =>
{ value: 2, label: 'AckedAt is defined' },
]}
/>
<Button onPress={async () => await mutations.debugRequeueAll.commit({ t: true })} icon={'radio'}
style={{ textAlign: 'left' }}>
Requeue all non acked
</Button>
</FilterModal>
15 changes: 15 additions & 0 deletions client/react-native/common/graphql/mutations/DebugRequeueAll.js
@@ -0,0 +1,15 @@
import { graphql } from 'react-relay'

import { commit } from '../../relay'

const DebugRequeueAllMutation = graphql`
mutation DebugRequeueAllMutation($t: Bool!) {
DebugRequeueAll(T: $t) {
T
}
}
`

export default {
commit: (input, configs) => commit(DebugRequeueAllMutation, 'DebugRequeueAll', input, configs),
}
1 change: 1 addition & 0 deletions client/react-native/common/graphql/mutations/index.js
Expand Up @@ -7,3 +7,4 @@ export conversationCreate from './ConversationCreate'
export conversationAddMessage from './ConversationAddMessage'
export conversationInvite from './ConversationInvite'
export debugRequeueEvent from './DebugRequeueEvent'
export debugRequeueAll from './DebugRequeueAll'
3 changes: 3 additions & 0 deletions client/react-native/common/schema.graphql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions core/api/node/graphql/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions core/api/node/graphql/resolver.go
Expand Up @@ -242,6 +242,10 @@ func (r *mutationResolver) DebugRequeueEvent(ctx context.Context, eventID string
})
}

func (r *mutationResolver) DebugRequeueAll(ctx context.Context, T bool) (*node.Void, error) {
return r.client.DebugRequeueAll(ctx, &node.Void{})
}

type queryResolver struct{ *Resolver }

func (r *queryResolver) Node(ctx context.Context, id string) (models.Node, error) {
Expand Down
3 changes: 3 additions & 0 deletions core/api/node/graphql/service.gen.graphql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f60426e

Please sign in to comment.