feat: Introduce generic auth steps
This commit is contained in:
9
packages/web/src/graphql/mutations/create-auth-link.ts
Normal file
9
packages/web/src/graphql/mutations/create-auth-link.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_AUTH_LINK = gql`
|
||||
mutation CreateAuthLink($id: String!) {
|
||||
createAuthLink(id: $id) {
|
||||
url
|
||||
}
|
||||
}
|
||||
`;
|
@@ -1,10 +1,10 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_CREDENTIALS = gql`
|
||||
mutation CreateCredentials($displayName: String!, $key: String!, $data: twitterCredentialInput!) {
|
||||
createCredential(displayName: $displayName, key: $key, data: $data) {
|
||||
export const CREATE_CREDENTIAL = gql`
|
||||
mutation CreateCredential($key: String!, $data: twitterCredentialInput!) {
|
||||
createCredential(key: $key, data: $data) {
|
||||
key
|
||||
displayName
|
||||
id
|
||||
data {
|
||||
consumerKey
|
||||
consumerSecret
|
||||
|
13
packages/web/src/graphql/mutations/index.ts
Normal file
13
packages/web/src/graphql/mutations/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { CREATE_CREDENTIAL } from './create-credentials';
|
||||
import { CREATE_AUTH_LINK } from './create-auth-link';
|
||||
|
||||
type Mutations = {
|
||||
[key: string]: any,
|
||||
}
|
||||
|
||||
const mutations: Mutations = {
|
||||
createCredential: CREATE_CREDENTIAL,
|
||||
createAuthLink: CREATE_AUTH_LINK,
|
||||
};
|
||||
|
||||
export default mutations;
|
@@ -19,6 +19,19 @@ export const GET_APP = gql`
|
||||
docUrl
|
||||
clickToCopy
|
||||
}
|
||||
authenticationSteps {
|
||||
step
|
||||
type
|
||||
name
|
||||
fields {
|
||||
name
|
||||
value
|
||||
fields {
|
||||
name
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
Reference in New Issue
Block a user