chore: Integrate graphql to the express app
This commit is contained in:
9
packages/backend/src/graphql/graphql-schema.ts
Normal file
9
packages/backend/src/graphql/graphql-schema.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { buildSchema } from 'graphql';
|
||||
|
||||
const graphQLSchema = buildSchema(`
|
||||
type Query {
|
||||
hello: String
|
||||
}
|
||||
`);
|
||||
|
||||
export default graphQLSchema;
|
7
packages/backend/src/graphql/root-resolver.ts
Normal file
7
packages/backend/src/graphql/root-resolver.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
const rootResolver = {
|
||||
hello: () => {
|
||||
return 'Hello world!';
|
||||
},
|
||||
};
|
||||
|
||||
export default rootResolver;
|
Reference in New Issue
Block a user