refactor(web): remove typescript
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import { InMemoryCache } from '@apollo/client';
|
||||
|
||||
interface IRef {
|
||||
__ref: string;
|
||||
}
|
||||
|
||||
const cache = new InMemoryCache({
|
||||
typePolicies: {
|
||||
App: {
|
||||
@@ -19,28 +14,24 @@ const cache = new InMemoryCache({
|
||||
__typename: 'App',
|
||||
key: appKey,
|
||||
});
|
||||
|
||||
cache.modify({
|
||||
id: appCacheId,
|
||||
fields: {
|
||||
connections: (existingConnections) => {
|
||||
const existingConnectionIndex = existingConnections.findIndex(
|
||||
(connection: IRef) => {
|
||||
(connection) => {
|
||||
return connection.__ref === verifiedConnection.__ref;
|
||||
}
|
||||
);
|
||||
const connectionExists = existingConnectionIndex !== -1;
|
||||
|
||||
// newly created and verified connection
|
||||
if (!connectionExists) {
|
||||
return [verifiedConnection, ...existingConnections];
|
||||
}
|
||||
|
||||
return existingConnections;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return verifiedConnection;
|
||||
},
|
||||
},
|
||||
@@ -48,5 +39,4 @@ const cache = new InMemoryCache({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default cache;
|
@@ -2,12 +2,6 @@ import { ApolloClient } from '@apollo/client';
|
||||
import cache from './cache';
|
||||
import createLink from './link';
|
||||
import appConfig from 'config/app';
|
||||
|
||||
type CreateClientOptions = {
|
||||
onError?: (message: string) => void;
|
||||
token?: string | null;
|
||||
};
|
||||
|
||||
const client = new ApolloClient({
|
||||
cache,
|
||||
link: createLink({ uri: appConfig.graphqlUrl }),
|
||||
@@ -17,16 +11,10 @@ const client = new ApolloClient({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export function mutateAndGetClient(
|
||||
options: CreateClientOptions
|
||||
): typeof client {
|
||||
export function mutateAndGetClient(options) {
|
||||
const { onError, token } = options;
|
||||
const link = createLink({ uri: appConfig.graphqlUrl, token, onError });
|
||||
|
||||
client.setLink(link);
|
||||
|
||||
return client;
|
||||
}
|
||||
|
||||
export default client;
|
@@ -1,69 +1,46 @@
|
||||
import { HttpLink, from } from '@apollo/client';
|
||||
import type { ApolloLink } from '@apollo/client';
|
||||
import { onError } from '@apollo/client/link/error';
|
||||
|
||||
import { setItem } from 'helpers/storage';
|
||||
import * as URLS from 'config/urls';
|
||||
|
||||
type CreateLinkOptions = {
|
||||
uri: string;
|
||||
token?: string | null;
|
||||
onError?: (message: string) => void;
|
||||
};
|
||||
|
||||
const createHttpLink = (
|
||||
options: Pick<CreateLinkOptions, 'uri' | 'token'>
|
||||
): ApolloLink => {
|
||||
const createHttpLink = (options) => {
|
||||
const { uri, token } = options;
|
||||
const headers = {
|
||||
authorization: token,
|
||||
};
|
||||
return new HttpLink({ uri, headers });
|
||||
};
|
||||
|
||||
const NOT_AUTHORISED = 'Not Authorised!';
|
||||
const createErrorLink = (callback: CreateLinkOptions['onError']): ApolloLink =>
|
||||
const createErrorLink = (callback) =>
|
||||
onError(({ graphQLErrors, networkError, operation }) => {
|
||||
const context = operation.getContext();
|
||||
const autoSnackbar = context.autoSnackbar ?? true;
|
||||
|
||||
if (graphQLErrors)
|
||||
graphQLErrors.forEach(({ message, locations, path }) => {
|
||||
if (autoSnackbar) {
|
||||
callback?.(message);
|
||||
}
|
||||
|
||||
console.error(
|
||||
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
|
||||
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`,
|
||||
);
|
||||
|
||||
if (message === NOT_AUTHORISED) {
|
||||
setItem('token', '');
|
||||
|
||||
if (window.location.pathname !== URLS.LOGIN) {
|
||||
window.location.href = URLS.LOGIN;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (networkError) {
|
||||
if (autoSnackbar) {
|
||||
callback?.(networkError.toString());
|
||||
}
|
||||
|
||||
console.error(`[Network error]: ${networkError}`);
|
||||
}
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
const noop = () => { };
|
||||
|
||||
const createLink = (options: CreateLinkOptions): ApolloLink => {
|
||||
const noop = () => {};
|
||||
const createLink = (options) => {
|
||||
const { uri, onError = noop, token } = options;
|
||||
|
||||
const httpOptions = { uri, token };
|
||||
|
||||
return from([createErrorLink(onError), createHttpLink(httpOptions)]);
|
||||
};
|
||||
|
||||
export default createLink;
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_APP_AUTH_CLIENT = gql`
|
||||
mutation CreateAppAuthClient($input: CreateAppAuthClientInput) {
|
||||
createAppAuthClient(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_APP_CONFIG = gql`
|
||||
mutation CreateAppConfig($input: CreateAppConfigInput) {
|
||||
createAppConfig(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_CONNECTION = gql`
|
||||
mutation CreateConnection($input: CreateConnectionInput) {
|
||||
createConnection(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_FLOW = gql`
|
||||
mutation CreateFlow($input: CreateFlowInput) {
|
||||
createFlow(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_ROLE = gql`
|
||||
mutation CreateRole($input: CreateRoleInput) {
|
||||
createRole(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_STEP = gql`
|
||||
mutation CreateStep($input: CreateStepInput) {
|
||||
createStep(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const CREATE_USER = gql`
|
||||
mutation CreateUser($input: CreateUserInput) {
|
||||
createUser(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_CONNECTION = gql`
|
||||
mutation DeleteConnection($input: DeleteConnectionInput) {
|
||||
deleteConnection(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_CURRENT_USER = gql`
|
||||
mutation DeleteCurrentUser {
|
||||
deleteCurrentUser
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_FLOW = gql`
|
||||
mutation DeleteFlow($input: DeleteFlowInput) {
|
||||
deleteFlow(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_ROLE = gql`
|
||||
mutation DeleteRole($input: DeleteRoleInput) {
|
||||
deleteRole(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_STEP = gql`
|
||||
mutation DeleteStep($input: DeleteStepInput) {
|
||||
deleteStep(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_USER = gql`
|
||||
mutation DeleteUser($input: DeleteUserInput) {
|
||||
deleteUser(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DUPLICATE_FLOW = gql`
|
||||
mutation DuplicateFlow($input: DuplicateFlowInput) {
|
||||
duplicateFlow(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const EXECUTE_FLOW = gql`
|
||||
mutation ExecuteFlow($input: ExecuteFlowInput) {
|
||||
executeFlow(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const FORGOT_PASSWORD = gql`
|
||||
mutation ForgotPassword($input: ForgotPasswordInput) {
|
||||
forgotPassword(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GENERATE_AUTH_URL = gql`
|
||||
mutation generateAuthUrl($input: GenerateAuthUrlInput) {
|
||||
generateAuthUrl(input: $input) {
|
@@ -4,12 +4,7 @@ import { VERIFY_CONNECTION } from './verify-connection';
|
||||
import { RESET_CONNECTION } from './reset-connection';
|
||||
import { DELETE_CONNECTION } from './delete-connection';
|
||||
import { GENERATE_AUTH_URL } from './generate-auth-url';
|
||||
|
||||
type Mutations = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
const mutations: Mutations = {
|
||||
const mutations = {
|
||||
createConnection: CREATE_CONNECTION,
|
||||
updateConnection: UPDATE_CONNECTION,
|
||||
verifyConnection: VERIFY_CONNECTION,
|
||||
@@ -17,5 +12,4 @@ const mutations: Mutations = {
|
||||
deleteConnection: DELETE_CONNECTION,
|
||||
generateAuthUrl: GENERATE_AUTH_URL,
|
||||
};
|
||||
|
||||
export default mutations;
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const LOGIN = gql`
|
||||
mutation Login($input: LoginInput) {
|
||||
login(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const REGISTER_USER = gql`
|
||||
mutation RegisterUser($input: RegisterUserInput) {
|
||||
registerUser(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const RESET_CONNECTION = gql`
|
||||
mutation ResetConnection($input: ResetConnectionInput) {
|
||||
resetConnection(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const RESET_PASSWORD = gql`
|
||||
mutation ResetPassword($input: ResetPasswordInput) {
|
||||
resetPassword(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_APP_AUTH_CLIENT = gql`
|
||||
mutation UpdateAppAuthClient($input: UpdateAppAuthClientInput) {
|
||||
updateAppAuthClient(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_APP_CONFIG = gql`
|
||||
mutation UpdateAppConfig($input: UpdateAppConfigInput) {
|
||||
updateAppConfig(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_CONFIG = gql`
|
||||
mutation UpdateConfig($input: JSONObject) {
|
||||
updateConfig(input: $input)
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_CONNECTION = gql`
|
||||
mutation UpdateConnection($input: UpdateConnectionInput) {
|
||||
updateConnection(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_CURRENT_USER = gql`
|
||||
mutation UpdateCurrentUser($input: UpdateCurrentUserInput) {
|
||||
updateCurrentUser(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_FLOW_STATUS = gql`
|
||||
mutation UpdateFlowStatus($input: UpdateFlowStatusInput) {
|
||||
updateFlowStatus(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_FLOW = gql`
|
||||
mutation UpdateFlow($input: UpdateFlowInput) {
|
||||
updateFlow(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_ROLE = gql`
|
||||
mutation UpdateRole($input: UpdateRoleInput) {
|
||||
updateRole(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_STEP = gql`
|
||||
mutation UpdateStep($input: UpdateStepInput) {
|
||||
updateStep(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_USER = gql`
|
||||
mutation UpdateUser($input: UpdateUserInput) {
|
||||
updateUser(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPSERT_SAML_AUTH_PROVIDER = gql`
|
||||
mutation UpsertSamlAuthProvider($input: UpsertSamlAuthProviderInput) {
|
||||
upsertSamlAuthProvider(input: $input) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const UPSERT_SAML_AUTH_PROVIDERS_ROLE_MAPPINGS = gql`
|
||||
mutation UpsertSamlAuthProvidersRoleMappings(
|
||||
$input: UpsertSamlAuthProvidersRoleMappingsInput
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const VERIFY_CONNECTION = gql`
|
||||
mutation VerifyConnection($input: VerifyConnectionInput) {
|
||||
verifyConnection(input: $input) {
|
32
packages/web/src/graphql/pagination.js
Normal file
32
packages/web/src/graphql/pagination.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const makeEmptyData = () => {
|
||||
return {
|
||||
edges: [],
|
||||
pageInfo: {
|
||||
currentPage: 1,
|
||||
totalPages: 1,
|
||||
},
|
||||
};
|
||||
};
|
||||
function offsetLimitPagination(keyArgs = false) {
|
||||
return {
|
||||
keyArgs,
|
||||
merge(existing, incoming, { args }) {
|
||||
if (!existing) {
|
||||
existing = makeEmptyData();
|
||||
}
|
||||
if (!incoming || incoming === null) return existing;
|
||||
const existingEdges = existing?.edges || [];
|
||||
const incomingEdges = incoming.edges || [];
|
||||
if (args) {
|
||||
const newEdges = [...existingEdges, ...incomingEdges];
|
||||
return {
|
||||
pageInfo: incoming.pageInfo,
|
||||
edges: newEdges,
|
||||
};
|
||||
} else {
|
||||
return existing;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
export default offsetLimitPagination;
|
@@ -1,70 +0,0 @@
|
||||
import type { FieldPolicy, Reference } from '@apollo/client';
|
||||
|
||||
type KeyArgs = FieldPolicy<unknown>['keyArgs'];
|
||||
|
||||
export type TEdge<TNode> =
|
||||
| {
|
||||
node: TNode;
|
||||
}
|
||||
| Reference;
|
||||
|
||||
export type TPageInfo = {
|
||||
currentPage: number;
|
||||
totalPages: number;
|
||||
};
|
||||
|
||||
export type TExisting<TNode> = Readonly<{
|
||||
edges: TEdge<TNode>[];
|
||||
pageInfo: TPageInfo;
|
||||
}>;
|
||||
|
||||
export type TIncoming<TNode> = {
|
||||
edges: TEdge<TNode>[];
|
||||
pageInfo: TPageInfo;
|
||||
};
|
||||
|
||||
export type CustomFieldPolicy<TNode> = FieldPolicy<
|
||||
TExisting<TNode> | null,
|
||||
TIncoming<TNode> | null,
|
||||
TIncoming<TNode> | null
|
||||
>;
|
||||
|
||||
const makeEmptyData = <TNode>(): TExisting<TNode> => {
|
||||
return {
|
||||
edges: [],
|
||||
pageInfo: {
|
||||
currentPage: 1,
|
||||
totalPages: 1,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
function offsetLimitPagination<TNode = Reference>(
|
||||
keyArgs: KeyArgs = false
|
||||
): CustomFieldPolicy<TNode> {
|
||||
return {
|
||||
keyArgs,
|
||||
merge(existing, incoming, { args }) {
|
||||
if (!existing) {
|
||||
existing = makeEmptyData<TNode>();
|
||||
}
|
||||
|
||||
if (!incoming || incoming === null) return existing;
|
||||
|
||||
const existingEdges = existing?.edges || [];
|
||||
const incomingEdges = incoming.edges || [];
|
||||
|
||||
if (args) {
|
||||
const newEdges = [...existingEdges, ...incomingEdges];
|
||||
return {
|
||||
pageInfo: incoming.pageInfo,
|
||||
edges: newEdges,
|
||||
};
|
||||
} else {
|
||||
return existing;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default offsetLimitPagination;
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APP_AUTH_CLIENT = gql`
|
||||
query GetAppAuthClient($id: String!) {
|
||||
getAppAuthClient(id: $id) {
|
||||
@@ -10,4 +9,3 @@ export const GET_APP_AUTH_CLIENT = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APP_AUTH_CLIENTS = gql`
|
||||
query GetAppAuthClients($appKey: String!, $active: Boolean) {
|
||||
getAppAuthClients(appKey: $appKey, active: $active) {
|
||||
@@ -10,4 +9,3 @@ export const GET_APP_AUTH_CLIENTS = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APP_CONFIG = gql`
|
||||
query GetAppConfig($key: String!) {
|
||||
getAppConfig(key: $key) {
|
||||
@@ -13,4 +12,3 @@ export const GET_APP_CONFIG = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APP_CONNECTIONS = gql`
|
||||
query GetAppConnections($key: String!) {
|
||||
getApp(key: $key) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APP = gql`
|
||||
query GetApp($key: String!) {
|
||||
getApp(key: $key) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_APPS = gql`
|
||||
query GetApps(
|
||||
$name: String
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_AUTOMATISCH_INFO = gql`
|
||||
query GetAutomatischInfo {
|
||||
getAutomatischInfo {
|
||||
@@ -8,4 +7,3 @@ export const GET_AUTOMATISCH_INFO = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_BILLING_AND_USAGE = gql`
|
||||
query GetBillingAndUsage {
|
||||
getBillingAndUsage {
|
||||
@@ -36,4 +35,3 @@ export const GET_BILLING_AND_USAGE = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,8 +1,6 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_CONFIG = gql`
|
||||
query GetConfig($keys: [String]) {
|
||||
getConfig(keys: $keys)
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_CONNECTED_APPS = gql`
|
||||
query GetConnectedApps($name: String) {
|
||||
getConnectedApps(name: $name) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_CURRENT_USER = gql`
|
||||
query GetCurrentUser {
|
||||
getCurrentUser {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_DYNAMIC_DATA = gql`
|
||||
query GetDynamicData(
|
||||
$stepId: String!
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_DYNAMIC_FIELDS = gql`
|
||||
query GetDynamicFields(
|
||||
$stepId: String!
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_EXECUTION_STEPS = gql`
|
||||
query GetExecutionSteps($executionId: String!, $limit: Int!, $offset: Int!) {
|
||||
getExecutionSteps(
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_EXECUTION = gql`
|
||||
query GetExecution($executionId: String!) {
|
||||
getExecution(executionId: $executionId) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_EXECUTIONS = gql`
|
||||
query GetExecutions($limit: Int!, $offset: Int!) {
|
||||
getExecutions(limit: $limit, offset: $offset) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_FLOW = gql`
|
||||
query GetFlow($id: String!) {
|
||||
getFlow(id: $id) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_FLOWS = gql`
|
||||
query GetFlows(
|
||||
$limit: Int!
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_INVOICES = gql`
|
||||
query GetInvoices {
|
||||
getInvoices {
|
||||
@@ -11,4 +10,3 @@ export const GET_INVOICES = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_NOTIFICATIONS = gql`
|
||||
query GetNotifications {
|
||||
getNotifications {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_PADDLE_INFO = gql`
|
||||
query GetPaddleInfo {
|
||||
getPaddleInfo {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_PAYMENT_PLANS = gql`
|
||||
query GetPaymentPlans {
|
||||
getPaymentPlans {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_PERMISSION_CATALOG = gql`
|
||||
query GetPermissionCatalog {
|
||||
getPermissionCatalog {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_ROLE = gql`
|
||||
query GetRole($id: String!) {
|
||||
getRole(id: $id) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_ROLES = gql`
|
||||
query GetRoles {
|
||||
getRoles {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_SAML_AUTH_PROVIDER_ROLE_MAPPINGS = gql`
|
||||
query GetSamlAuthProviderRoleMappings($id: String!) {
|
||||
getSamlAuthProviderRoleMappings(id: $id) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_SAML_AUTH_PROVIDER = gql`
|
||||
query GetSamlAuthProvider {
|
||||
getSamlAuthProvider {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_STEP_WITH_TEST_EXECUTIONS = gql`
|
||||
query GetStepWithTestExecutions($stepId: String!) {
|
||||
getStepWithTestExecutions(stepId: $stepId) {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_SUBSCRIPTION_STATUS = gql`
|
||||
query GetSubscriptionStatus {
|
||||
getSubscriptionStatus {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_TRIAL_STATUS = gql`
|
||||
query GetTrialStatus {
|
||||
getTrialStatus {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_USER = gql`
|
||||
query GetUser($id: String!) {
|
||||
getUser(id: $id) {
|
@@ -1,14 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_USERS = gql`
|
||||
query GetUsers(
|
||||
$limit: Int!
|
||||
$offset: Int!
|
||||
) {
|
||||
getUsers(
|
||||
limit: $limit
|
||||
offset: $offset
|
||||
) {
|
||||
query GetUsers($limit: Int!, $offset: Int!) {
|
||||
getUsers(limit: $limit, offset: $offset) {
|
||||
pageInfo {
|
||||
currentPage
|
||||
totalPages
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const HEALTHCHECK = gql`
|
||||
query Healthcheck {
|
||||
healthcheck {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const LIST_SAML_AUTH_PROVIDERS = gql`
|
||||
query ListSamlAuthProviders {
|
||||
listSamlAuthProviders {
|
@@ -1,5 +1,4 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const TEST_CONNECTION = gql`
|
||||
query TestConnection($id: String!) {
|
||||
testConnection(id: $id) {
|
Reference in New Issue
Block a user