diff --git a/packages/web/src/graphql/mutations/create-connection.ts b/packages/web/src/graphql/mutations/create-connection.ts new file mode 100644 index 00000000..dab27933 --- /dev/null +++ b/packages/web/src/graphql/mutations/create-connection.ts @@ -0,0 +1,14 @@ +import { gql } from '@apollo/client'; + +export const CREATE_CONNECTION = gql` + mutation CreateConnection($key: String!, $data: twitterCredentialInput!) { + createConnection(key: $key, data: $data) { + key + id + data { + consumerKey + consumerSecret + } + } + } +`; diff --git a/packages/web/src/graphql/mutations/create-credentials.ts b/packages/web/src/graphql/mutations/create-credentials.ts deleted file mode 100644 index 685c4f3a..00000000 --- a/packages/web/src/graphql/mutations/create-credentials.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { gql } from '@apollo/client'; - -export const CREATE_CREDENTIAL = gql` - mutation CreateCredential($key: String!, $data: twitterCredentialInput!) { - createCredential(key: $key, data: $data) { - key - id - data { - consumerKey - consumerSecret - } - } - } -`; diff --git a/packages/web/src/graphql/mutations/index.ts b/packages/web/src/graphql/mutations/index.ts index 1291f8f9..8e46f88d 100644 --- a/packages/web/src/graphql/mutations/index.ts +++ b/packages/web/src/graphql/mutations/index.ts @@ -1,14 +1,14 @@ -import { CREATE_CREDENTIAL } from './create-credentials'; +import { CREATE_CONNECTION } from './create-connection'; import { CREATE_AUTH_LINK } from './create-auth-link'; -import { UPDATE_CREDENTIAL } from './update-credential'; +import { UPDATE_CONNECTION } from './update-connection'; type Mutations = { [key: string]: any, } const mutations: Mutations = { - createCredential: CREATE_CREDENTIAL, - updateCredential: UPDATE_CREDENTIAL, + createConnection: CREATE_CONNECTION, + updateConnection: UPDATE_CONNECTION, createAuthLink: CREATE_AUTH_LINK, }; diff --git a/packages/web/src/graphql/mutations/update-credential.ts b/packages/web/src/graphql/mutations/update-connection.ts similarity index 52% rename from packages/web/src/graphql/mutations/update-credential.ts rename to packages/web/src/graphql/mutations/update-connection.ts index 4f1b4502..9e854540 100644 --- a/packages/web/src/graphql/mutations/update-credential.ts +++ b/packages/web/src/graphql/mutations/update-connection.ts @@ -1,8 +1,8 @@ import { gql } from '@apollo/client'; -export const UPDATE_CREDENTIAL = gql` - mutation UpdateCredential($id: String!, $data: twitterCredentialInput!) { - updateCredential(id: $id, data: $data) { +export const UPDATE_CONNECTION = gql` + mutation UpdateConnection($id: String!, $data: twitterCredentialInput!) { + updateConnection(id: $id, data: $data) { id key verified