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

fix: replace skip with skipOnClient to avoid runtime errors #2751

Merged

Commits on Oct 21, 2024

  1. fix: replace skip with skipOnClient to avoid runtime errors (#2751)

    follows #2743
    
    **Changes:**
    
    - Updated `useControllableValue` hook in `EndpointSelect` component to explicitly type it with `string`
    - Changed `@skip` directive to `@skipOnClient` in GraphQL query for the `endpoint` field
    
    **Rationale:**
    
    - The explicit typing of `useControllableValue<string>` improves type safety and clarity in the codebase
    - Switching from `@skip` to `@skipOnClient` directive likely aligns with updated GraphQL schema or client-side optimization strategies
    
    **Effects:**
    
    - These changes should not directly affect users
    - Developers will benefit from improved type checking and potentially more efficient GraphQL query execution
    - Avoid runtime errors when endpoint is empty.
    
    **How to test:**
    1. Remove all services
    2. Enable `enableLLMPlayground` from config.toml
    3. Visit LLM Playground page
    
    **Checklist for reviewer:**
    - [ ] Check if runtime error disappears.
    
    **Checklist:**
    
    - [x] Mention to the original issue
    - [ ] Documentation
    - [ ] Minium required manager version
    - [x] Specific setting for review (eg., KB link, endpoint or how to setup)
    - [x] Minimum requirements to check during review
    - [ ] Test case(s) to demonstrate the difference of before/after
    agatha197 committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    e43f244 View commit details
    Browse the repository at this point in the history