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
Post a Comment