-
Notifications
You must be signed in to change notification settings - Fork 50
Allow MCP to use dev schema for experimental features #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/agent-toolkit/package.json
Outdated
| "watch": "rollup -c -w", | ||
| "fetch:schema": "bash fetch-schema.sh", | ||
| "codegen": "graphql-codegen", | ||
| "codegen": "graphql-codegen --config codegen.yml && graphql-codegen --config codegen.yml --project dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means you will alwasy have to fix dev together with regular, I suggest makig it separate command that does both so if dev breaks (and I think it will) but you try to coedegene for the happy flow that is not dev you wont have bugs of otehr people to solve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, parametrized fetching schema, codegen and fetch+codegen able to process only specific schemas (or both by default)
|
|
||
| export const getFilteredToolInstances = ( | ||
| instanceOptions: { apiClient: ApiClient; apiToken: string; context?: MondayApiToolContext }, | ||
| instanceOptions: { apiClient: ApiClient; devApiClient: ApiClient; apiToken: string; context?: MondayApiToolContext }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you use the latest version of the api client package, there is param that allows you to pass version, so I think if a tool expects to be on dev version which is irregular it can be marked somhow or just directly pass the param, passingm multiple client can be problematic lets say we want now 3 different versions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's amazing, it makes it even simpler. I was not aware we can override version in the .request() method, thanks for that 👑
...lkit/src/core/tools/monday-dev-tools/get-sprints-boards-tool/get-sprints-boards-tool.test.ts
Outdated
Show resolved
Hide resolved
...gent-toolkit/src/core/tools/platform-api-tools/create-update-tool/create-update-tool.test.ts
Outdated
Show resolved
Hide resolved
packages/agent-toolkit/codegen.yml
Outdated
| schema: 'src/monday-graphql/schema.graphql' | ||
| documents: | ||
| - 'src/**/*.graphql.ts' | ||
| - '!src/**/*.graphql-dev.ts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need it? it looked into it by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not as it does not match the pattern but I wanted to be explicit
packages/agent-toolkit/codegen.yml
Outdated
| - node -e "const fs = require('fs'); fs.writeFileSync('src/monday-graphql/generated/graphql/index.ts', '/* eslint-disable */\nexport * from \'./gql\';');" | ||
| dev: | ||
| schema: 'src/monday-graphql/schema-dev.graphql' | ||
| documents: 'src/**/*.graphql-dev.ts' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt about graphql.dev instead? idk actaully whatever you want :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me, I'll adjust
This PR adds support for multiple GraphQL "projects" for code-generation. Thanks to that, we are able to reference experimental endpoints from 'dev' schema. All queries referencing dev schema must be in file with file extension
graphql-dev.ts.The goal is to have 1 default client (based on stable/current version) and 1 dev client for experimental features.