Created
July 10, 2022 14:09
-
-
Save kylemocode/3f3f3c9e1db4a39254b162eec30a17b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const schemaWithMocks = addMocksToSchema({ | |
schema, | |
mocks, | |
resolvers: (store) => ({ | |
Query: { | |
books: (_, { id }) => { | |
return Array.from( | |
{ length: 8 }, | |
() => store.get('Book', id) | |
); | |
}, | |
}, | |
}), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment