mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
feat(core): add enable url preview to workspace settings (#8089)
This commit is contained in:
@@ -1170,6 +1170,32 @@ mutation verifyEmail($token: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getEnableUrlPreviewQuery = {
|
||||
id: 'getEnableUrlPreviewQuery' as const,
|
||||
operationName: 'getEnableUrlPreview',
|
||||
definitionName: 'workspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getEnableUrlPreview($id: String!) {
|
||||
workspace(id: $id) {
|
||||
enableUrlPreview
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const setEnableUrlPreviewMutation = {
|
||||
id: 'setEnableUrlPreviewMutation' as const,
|
||||
operationName: 'setEnableUrlPreview',
|
||||
definitionName: 'updateWorkspace',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation setEnableUrlPreview($id: ID!, $enableUrlPreview: Boolean!) {
|
||||
updateWorkspace(input: {id: $id, enableUrlPreview: $enableUrlPreview}) {
|
||||
id
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const enabledFeaturesQuery = {
|
||||
id: 'enabledFeaturesQuery' as const,
|
||||
operationName: 'enabledFeatures',
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
query getEnableUrlPreview($id: String!) {
|
||||
workspace(id: $id) {
|
||||
enableUrlPreview
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
mutation setEnableUrlPreview($id: ID!, $enableUrlPreview: Boolean!) {
|
||||
updateWorkspace(input: { id: $id, enableUrlPreview: $enableUrlPreview }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -2325,6 +2325,25 @@ export type VerifyEmailMutation = {
|
||||
verifyEmail: boolean;
|
||||
};
|
||||
|
||||
export type GetEnableUrlPreviewQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetEnableUrlPreviewQuery = {
|
||||
__typename?: 'Query';
|
||||
workspace: { __typename?: 'WorkspaceType'; enableUrlPreview: boolean };
|
||||
};
|
||||
|
||||
export type SetEnableUrlPreviewMutationVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
enableUrlPreview: Scalars['Boolean']['input'];
|
||||
}>;
|
||||
|
||||
export type SetEnableUrlPreviewMutation = {
|
||||
__typename?: 'Mutation';
|
||||
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
|
||||
};
|
||||
|
||||
export type EnabledFeaturesQueryVariables = Exact<{
|
||||
id: Scalars['String']['input'];
|
||||
}>;
|
||||
@@ -2619,6 +2638,11 @@ export type Queries =
|
||||
variables: SubscriptionQueryVariables;
|
||||
response: SubscriptionQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getEnableUrlPreviewQuery';
|
||||
variables: GetEnableUrlPreviewQueryVariables;
|
||||
response: GetEnableUrlPreviewQuery;
|
||||
}
|
||||
| {
|
||||
name: 'enabledFeaturesQuery';
|
||||
variables: EnabledFeaturesQueryVariables;
|
||||
@@ -2831,6 +2855,11 @@ export type Mutations =
|
||||
variables: VerifyEmailMutationVariables;
|
||||
response: VerifyEmailMutation;
|
||||
}
|
||||
| {
|
||||
name: 'setEnableUrlPreviewMutation';
|
||||
variables: SetEnableUrlPreviewMutationVariables;
|
||||
response: SetEnableUrlPreviewMutation;
|
||||
}
|
||||
| {
|
||||
name: 'setWorkspaceExperimentalFeatureMutation';
|
||||
variables: SetWorkspaceExperimentalFeatureMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user