feat: Introduce generic auth steps

This commit is contained in:
Ali BARIN
2021-10-14 18:34:30 +02:00
parent 1fbc58e7e1
commit 9c529b6c6d
12 changed files with 399 additions and 313 deletions

View File

@@ -0,0 +1,9 @@
import { gql } from '@apollo/client';
export const CREATE_AUTH_LINK = gql`
mutation CreateAuthLink($id: String!) {
createAuthLink(id: $id) {
url
}
}
`;

View File

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

View 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;

View File

@@ -19,6 +19,19 @@ export const GET_APP = gql`
docUrl
clickToCopy
}
authenticationSteps {
step
type
name
fields {
name
value
fields {
name
value
}
}
}
}
}
`;