refactor: introduce input in gql mutations
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
f5f7a998ca
commit
030d886cf7
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_AUTH_DATA = gql`
|
||||
mutation createAuthData($id: String!) {
|
||||
createAuthData(id: $id) {
|
||||
mutation CreateAuthData($input: CreateAuthDataInput) {
|
||||
createAuthData(input: $input) {
|
||||
url
|
||||
}
|
||||
}
|
||||
|
@@ -2,10 +2,9 @@ import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_CONNECTION = gql`
|
||||
mutation CreateConnection(
|
||||
$key: AvailableAppsEnumType!
|
||||
$formattedData: JSONObject!
|
||||
$input: CreateConnectionInput
|
||||
) {
|
||||
createConnection(key: $key, formattedData: $formattedData) {
|
||||
createConnection(input: $input) {
|
||||
id
|
||||
key
|
||||
verified
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_FLOW = gql`
|
||||
mutation createFlow($input: FlowInput) {
|
||||
mutation CreateFlow($input: CreateFlowInput) {
|
||||
createFlow(input: $input) {
|
||||
id
|
||||
name
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_STEP = gql`
|
||||
mutation CreateStep($input: StepInput!) {
|
||||
mutation CreateStep($input: CreateStepInput) {
|
||||
createStep(input: $input) {
|
||||
id
|
||||
type
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_CONNECTION = gql`
|
||||
mutation DeleteConnection($id: String!) {
|
||||
deleteConnection(id: $id)
|
||||
mutation DeleteConnection($input: DeleteConnectionInput) {
|
||||
deleteConnection(input: $input)
|
||||
}
|
||||
`;
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_STEP = gql`
|
||||
mutation DeleteStep($id: String!) {
|
||||
deleteStep(id: $id) {
|
||||
mutation DeleteStep($input: DeleteStepInput) {
|
||||
deleteStep(input: $input) {
|
||||
id
|
||||
flow {
|
||||
id
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const EXECUTE_FLOW = gql`
|
||||
mutation ExecuteFlow($stepId: String!) {
|
||||
executeFlow(stepId: $stepId) {
|
||||
mutation ExecuteFlow($input: ExecuteFlowInput) {
|
||||
executeFlow(input: $input) {
|
||||
step {
|
||||
id
|
||||
status
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const RESET_CONNECTION = gql`
|
||||
mutation ResetConnection($id: String!) {
|
||||
resetConnection(id: $id) {
|
||||
mutation ResetConnection($input: ResetConnectionInput) {
|
||||
resetConnection(input: $input) {
|
||||
id
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_CONNECTION = gql`
|
||||
mutation UpdateConnection($id: String!, $formattedData: JSONObject!) {
|
||||
updateConnection(id: $id, formattedData: $formattedData) {
|
||||
mutation UpdateConnection($input: UpdateConnectionInput) {
|
||||
updateConnection(input: $input) {
|
||||
id
|
||||
key
|
||||
verified
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_FLOW = gql`
|
||||
mutation UpdateFlow($id: String!, $name: String!) {
|
||||
updateFlow(id: $id, name: $name) {
|
||||
mutation UpdateFlow($input: UpdateFlowInput) {
|
||||
updateFlow(input: $input) {
|
||||
id
|
||||
name
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_STEP = gql`
|
||||
mutation UpdateStep($input: StepInput!) {
|
||||
mutation UpdateStep($input: UpdateStepInput) {
|
||||
updateStep(input: $input) {
|
||||
id
|
||||
type
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const VERIFY_CONNECTION = gql`
|
||||
mutation VerifyConnection($id: String!) {
|
||||
verifyConnection(id: $id) {
|
||||
mutation VerifyConnection($input: VerifyConnectionInput) {
|
||||
verifyConnection(input: $input) {
|
||||
id
|
||||
verified
|
||||
formattedData {
|
||||
|
Reference in New Issue
Block a user