chore: Integrate graphql to the express app

This commit is contained in:
Faruk AYDIN
2021-10-04 19:42:23 +02:00
committed by Ali BARIN
parent 7a675e6c79
commit 7d98333a8a
7 changed files with 76 additions and 15 deletions

View File

@@ -0,0 +1,9 @@
import { buildSchema } from 'graphql';
const graphQLSchema = buildSchema(`
type Query {
hello: String
}
`);
export default graphQLSchema;

View File

@@ -0,0 +1,7 @@
const rootResolver = {
hello: () => {
return 'Hello world!';
},
};
export default rootResolver;