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

Migrate public api to new sessions/errors queries #8478

Open
linear bot opened this issue May 6, 2024 · 2 comments
Open

Migrate public api to new sessions/errors queries #8478

linear bot opened this issue May 6, 2024 · 2 comments

Comments

@linear
Copy link

linear bot commented May 6, 2024

No description provided.

Copy link
Author

linear bot commented May 6, 2024

Copy link

greptile-apps bot commented May 6, 2024

To migrate the public API to new sessions/errors queries, follow these steps based on the schema.resolvers.go file in the highlight/highlight repository:

  1. Identify Existing Session and Error Query Resolvers: Review the current GraphQL schema definitions and resolver implementations related to sessions and errors. Look for functions like Session, ErrorGroup, and ErrorObject resolvers.

  2. Define New GraphQL Queries: In your schema definition file (not provided), add new GraphQL query types for the sessions and errors that match your new requirements.

  3. Implement New Resolvers: Based on the new query definitions, implement resolver functions in schema.resolvers.go. Use existing resolvers as a reference for accessing the database and formatting the response.

  4. Update Resolver Functions: For sessions and errors, update the resolver functions to fetch and return data according to the new query parameters and structures. Refer to functions like Session, ErrorGroupResolver, and ErrorObjectResolver for patterns on handling database interactions and response formatting.

  5. Test Your Changes: Ensure that your new queries and resolvers work as expected by writing and running tests. This step is crucial for validating the functionality and performance of the new API endpoints.

Remember to review and possibly refactor related parts of the codebase that might be affected by these changes, such as frontend queries or other backend services that consume the modified API.

References

highlight/highlight/backend/private-graph/graph/schema.resolvers.go
highlight/highlight/backend/private-graph/graph/generated/generated.go

Ask Greptile

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

No branches or pull requests

0 participants