Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Create a GraphQL — Firebase server just with a schema. 🚀
Now you can create a GraphQL server, connected to your Firebase 🔥 database just running a command on your terminal.
How to use it:
- Install easygraphql-firebase:
$ npm install easygraphql-firebase -g
2. Create a GraphQL schema file with the model you want to have:
type Student { key: ID! age: Int! name: String!}type School { key: ID! location: String! students: Int! name: String! student: Student!}input StudentInput { age: Int! name: String!}input SchoolInput { location: String! students: Int! name: String! phone: String! student: StudentInput!}type Query { getStudentByUsername(name: String!): Student! getStudents: [Student!]! getSchool(name: String!): School! getSchools: [School!]!}type Mutation { createStudent(input: StudentInput!): Student! createSchool(input: SchoolInput!): School!}
3. Run on your terminal:
$ easygraphql-firebase
And that’s it, easygraphql-firebase will do everything for you, it will create the server, resolvers, test files and more… check the video to see the result
If you like this package don’t forget to give a ⭐️ on GitHub.
Repo: https://github.com/EasyGraphQL/easygraphql-firebase
npm: https://www.npmjs.com/package/easygraphql-firebase
Website: https://easygraphql.com/
Create a GraphQL — Firebase server just with a schema. 🚀 was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.