refactor: introduce input in gql mutations

This commit is contained in:
Ali BARIN
2022-03-08 12:20:34 +01:00
committed by Ömer Faruk Aydın
parent f5f7a998ca
commit 030d886cf7
21 changed files with 67 additions and 39 deletions

View File

@@ -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
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)
}
`;

View File

@@ -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

View File

@@ -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

View File

@@ -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
}
}

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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 {