mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-04-28 12:13:42 +03:00
* chore(deps): update dependency prettier to v3 * Format --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathan Bierema <nbierema@gmail.com>
27 lines
544 B
TypeScript
27 lines
544 B
TypeScript
import fs from 'fs';
|
|
import type { Store } from '../store.js';
|
|
|
|
export const schema = fs.readFileSync(
|
|
new URL('./schema_def.graphql', import.meta.url),
|
|
'utf8',
|
|
);
|
|
|
|
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);
|
|
},
|
|
},
|
|
};
|