Add integration tests for /metadata + fix relation deletion (#8706)

In this PR

1. Add integration tests for /metadata (master issue:
https://github.com/twentyhq/twenty/issues/8719)
2. Fix relation deletion: index on "from" object was not deleted,
impeding creation of a new relation between the same two objects A and B
after relation between A and B was deleted
This commit is contained in:
Marie
2024-11-26 10:00:36 +01:00
committed by GitHub
parent 49526937fa
commit 7bde2006c5
11 changed files with 597 additions and 9 deletions

View File

@ -0,0 +1,30 @@
import gql from 'graphql-tag';
type ObjectsFactoryParams = {
gqlFields: string;
input: {
filter: object;
paging: object;
};
};
export const objectsMetadataFactory = ({
gqlFields,
input,
}: ObjectsFactoryParams) => ({
query: gql`
query ObjectsMetadata($filter: objectFilter!, $paging: CursorPaging!) {
objects(filter: $filter, paging: $paging) {
edges {
node {
${gqlFields}
}
}
}
}
`,
variables: {
filter: input.filter,
paging: input.paging,
},
});