615c3d8dbe
Closes the `apollo-server-core` alerts (**#735**, **#736**) by
**removing the dependency** — no Apollo migration, no resolution.
### Why these were flagged "no patch available"
`apollo-server-core` is **Apollo Server v3, which is end-of-life** (per
its npm deprecation notice). No patched release of this package will
ever exist — the CVE fix lives only in the renamed `@apollo/server` v4
package.
### Why we can just drop it
twenty-server **doesn't use Apollo Server** — its GraphQL runtime is
**GraphQL Yoga** (`YogaDriver`). `apollo-server-core` was imported for
one thing only: the `gql` template tag in **6 integration test files**.
`gql` from `graphql-tag` is identical (apollo-server-core merely
re-exports it), `graphql-tag` is **already a direct dependency**, and
**15 other twenty-server tests already import `gql` from it**.
### Change
- Swapped `import { gql } from 'apollo-server-core'` → `import { gql }
from 'graphql-tag'` in the 6 test files.
- Removed `apollo-server-core` from
`packages/twenty-server/package.json`.
- Result: `apollo-server-core` (and its transitive surface) is gone from
`yarn.lock` entirely.
### Verification
- `yarn install --immutable` ✓
- No `apollo-server-core` references remain in source or lockfile
- Integration tests (which exercise the swapped `gql` imports) run in CI
25 lines
544 B
TypeScript
25 lines
544 B
TypeScript
import { gql } from 'graphql-tag';
|
|
import { type ConfigVariableValue } from 'twenty-shared/types';
|
|
|
|
export type CreateConfigVariableFactoryInput = {
|
|
key: string;
|
|
value: ConfigVariableValue;
|
|
};
|
|
|
|
export const createConfigVariableQueryFactory = ({
|
|
key,
|
|
value,
|
|
}: CreateConfigVariableFactoryInput) => {
|
|
return {
|
|
query: gql`
|
|
mutation CreateDatabaseConfigVariable($key: String!, $value: JSON!) {
|
|
createDatabaseConfigVariable(key: $key, value: $value)
|
|
}
|
|
`,
|
|
variables: {
|
|
key,
|
|
value,
|
|
},
|
|
};
|
|
};
|