Skip to content

Commit

Permalink
fix(server): ability to reset mock store
Browse files Browse the repository at this point in the history
  • Loading branch information
fabis94 committed Jul 29, 2024
1 parent 1e5dada commit fcabd93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/server/modules/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const buildBaseConfig = async (): Promise<SpeckleModuleMocksConfig> => {
const faker = (await import('@faker-js/faker')).faker

return {
resolvers: ({ helpers: { getFieldValue } }) => ({
resolvers: ({ helpers: { getFieldValue }, store }) => ({
Query: {
_: () => {
store.reset()
return 'Mock Store reset!'
}
},
LimitedUser: {
role: (parent) =>
getFieldValue(
Expand Down

0 comments on commit fcabd93

Please sign in to comment.