mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-04-29 12:43:43 +03:00
* fix(deps): update apollo graphql packages to v3 * stash * Change Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
26 lines
527 B
TypeScript
26 lines
527 B
TypeScript
import fs from 'fs';
|
|
import { Store } from '../store';
|
|
|
|
export const schema = fs
|
|
.readFileSync(require.resolve('./schema_def.graphql'))
|
|
.toString();
|
|
|
|
export const resolvers = {
|
|
Query: {
|
|
reports: function report(
|
|
source: unknown,
|
|
args: unknown,
|
|
context: { store: Store }
|
|
) {
|
|
return context.store.listAll();
|
|
},
|
|
report: function report(
|
|
source: unknown,
|
|
args: { id: string },
|
|
context: { store: Store }
|
|
) {
|
|
return context.store.get(args.id);
|
|
},
|
|
},
|
|
};
|