Apollo GraphQL addMockFunctionsToSchema: Prevent Mocking Certain Fields -


i'm using apollo graphql js library, , in particular i'm using addmockfunctionstoschema function. works great except 1 thing: fills in nulls on non-mocked records.

let's have enum options a, b, or c field typeoffoo, , database returns { typeoffoo: null }. if have mocking turned on returned graphql client (say) { typeoffoo: 'b' }.

so, i'd tell mocking function not mess typeoffoo, because when it's null want null back. possible, , if how can correct it?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -