• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 14894944676

07 May 2025 11:07PM UTC coverage: 49.059% (+0.09%) from 48.969%
14894944676

Pull #6016

github

web-flow
Merge 152100e56 into 5b0d3d083
Pull Request #6016: fix: provide current route ref value from server entry

1595 of 3417 branches covered (46.68%)

Branch coverage included in aggregate %.

0 of 12 new or added lines in 6 files covered. (0.0%)

1 existing line in 1 file now uncovered.

2393 of 4712 relevant lines covered (50.79%)

286.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/api/ContentfulPreviewLink.js
1
import { ApolloLink } from '@apollo/client/core/index';
2

3
export default ({ route }) => {
4
        return new ApolloLink((operation, forward) => {
×
5
                // Only do this on contentful queries
6
                if (operation.operationName.includes('contentful')) {
×
7
                        // Fetch preview value from route query
NEW
8
                        const isPreview = route?.query?.preview === 'true';
×
9
                        // Add the preview variable to the current query
NEW
10
                        if (!operation?.variables?.preview && isPreview) {
×
11
                                // eslint-disable-next-line no-param-reassign
12
                                operation.variables.preview = true;
×
13
                        }
14
                }
15

16
                return forward(operation);
×
17
        });
18
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc