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

kiva / ui / 15721249898

18 Jun 2025 12:51AM UTC coverage: 52.564% (+4.7%) from 47.872%
15721249898

Pull #6091

github

web-flow
Merge 1f8983303 into e6c7ae52e
Pull Request #6091: feat: cacheable server-side rendering

1789 of 3594 branches covered (49.78%)

Branch coverage included in aggregate %.

276 of 398 new or added lines in 38 files covered. (69.35%)

7 existing lines in 4 files now uncovered.

2629 of 4811 relevant lines covered (54.65%)

280.98 hits per line

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

0.0
/src/api/SnowplowSessionLink.js
1
import { setContext } from '@apollo/client/link/context/index';
2
import _set from 'lodash/set';
3

4
function getSPCookieSession(cookieStore) {
5
        // kiva specific sp cookie
6
        const sp = cookieStore.get('_sp_id.6d5c');
×
7
        // handle missing cookie
8
        if (typeof sp === 'undefined') {
×
9
                return '';
×
10
        }
11
        const spCookieArray = sp.split('.');
×
12
        // get last item in the array, our session id
13
        const sessionId = spCookieArray[spCookieArray.length - 1];
×
14
        return sessionId;
×
15
}
16

17
export default ({ cookieStore }) => {
18
        return setContext((operation, previousContext) => {
×
NEW
19
                if (!cookieStore) return previousContext;
×
20

21
                // fetch session id
22
                const spSessionId = getSPCookieSession(cookieStore);
×
23
                // pass along existing context if no session id exists
24
                if (spSessionId === '') {
×
25
                        return previousContext;
×
26
                }
27
                // add header to existing context and pass along
28
                return _set(previousContext, 'headers.X-Session-Id', spSessionId);
×
29
        });
30
};
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