• Lukas 'Eipi' Eipert's avatar
    Update to ApolloClient@3 · f07ac8a5
    Lukas 'Eipi' Eipert authored
    This is an attempt to update to ApolloClient@3. Multiple packages have
    been replaced by a single one. This will likely result in a red pipeline
    because Caches are now immutable. But it should be a good starting point
    to explore what goes wrong:
    
    TODOs:
    1. Check that caching works correctly
    2. Check that startup graphql works correctly
    3. Update documentation with correct links
    4. Link against importing from `@apollo/client`, we should always import
    from `@apollo/client/core` as we otherwise pull in React related
    dependencies.
    
    Map `@apollo/client` to `@apollo/client/core`
    
    Fix vendor dll
    
    Migrate remaining apollo-link uses
    
    Fixed Introspection fragment matcher
    
    Added merge policies
    
    Fixed more fragment matchers
    
    Fixed dataIdFromObject imports
    
    Fixed gql imports
    
    Fixed apollo-link imports
    
    Remove change to upload link
    
    Removed duplicated ids
    
    Fixed MR widget type policies
    
    Fixed structure
    Fixed incidents app
    
    Added id to alert management
    
    Added ids to pipeline editor
    
    Add a resolution for subscriptions-transport-ws
    
    Note: This is needed because @apollo/client has a peer dependency and
    some other dependency pulls in a newer version. Both are functionally
    equivalent.
    Replaced fragmentMatcher with possible types
    
    Removed id from type Repository
    
    Added a few basic type policies
    
    Fixed unit tests to pass
    
    Added typenames to unit tests to make them pass
    Cleaned up data checks in components
    
    Apollo 3 doesn't return data property with result on error; thus, we need to check on result hooks if data exists before doing any operations with it
    Fixed stylelint errors
    
    Add missing typename in spec
    
    Removed check for data
    
    Cleaning up changes
    
    Removed some unnecessary changes like imports order
    Apply 1 suggestion(s) to 1 file(s)
    Manually set error policy to 'none'
    
    Removed unnecessary guards from result hook in queries
    Revert "Manually set error policy to 'none'"
    
    This reverts commit 657eac6727c563555dcbe8a3013801ae710b80db.
    Apply 1 suggestion(s) to 1 file(s)
    Fixed stripTypenames to be used on widget
    
    Fixed specs after review
    
    Add comment about pendingApolloRequests
    
    - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55062#note_838943715
    
    Reverted subsriptions transport change
    f07ac8a5
mock_data.js 22.7 KB