Skip to content
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

feat: Refactor GraphQL adapter to allow more agent dynamism #337

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

nadeesha
Copy link
Contributor

Agent can now "peer" into the graphQL schema when needed, and invoke tools without being validated by JSON schema. Since the GraphQL layer is strongly typed, we can essentially pass-through the object and let it course correct on wrong types.

  • Removed introspection-based schema handling in favor of direct schema string parsing using printSchema.
  • Introduced parseGraphQLSchema function to extract queries, mutations, and types from the schema.
  • Updated service registration to utilize the new parsing logic, improving the handling of GraphQL operations.
  • Added new utility functions for peeking at the schema and looking up types.

- Removed introspection-based schema handling in favor of direct schema string parsing using `printSchema`.
- Introduced `parseGraphQLSchema` function to extract queries, mutations, and types from the schema.
- Updated service registration to utilize the new parsing logic, improving the handling of GraphQL operations.
- Added new utility functions for peeking at the schema and looking up types.
- Created tests for the new parser functionality and added a sample GraphQL schema for testing.
- Enhanced error handling and input validation for service functions.
@nadeesha nadeesha marked this pull request as ready for review December 19, 2024 02:25
@nadeesha nadeesha merged commit 71d575b into main Dec 19, 2024
28 checks passed
@nadeesha nadeesha deleted the nadeesha/fix-graphql branch December 19, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant