Skip to content

GraphQL API plugged into the old MySQL database of JeuxAmateurs (French website about amateur games)

License

Notifications You must be signed in to change notification settings

YoruNoHikage/jeuxamateurs-graphql

Repository files navigation

JeuxAmateurs GraphQL API

GraphQL API plugged into the old MySQL database of JeuxAmateurs (French website about amateur games).

Disclaimer: This was an experimentation to understand better how you can easily build a GraphQL schema using available tools. Of course, it isn't very optimized at all but I hope with this you can be inspired.

Installation

Load structure.sql, fill it with data and run npm install && npm start. Here's your GraphQL API!. Note that the structure is old and ugly, for testing and posterity only!

Interesting facts

GraphQL comments as a documentation

GraphQL comments above the line can be used for documenting directly. Take a look at this:

# My awesome type
type User {
  # This is a username
  username: String!
  # I shouldn't have exposed this
  password: String!
}

And the result in the GraphiQL editor: GraphiQL example for comments as a doc.

Exclamation mark inside Array

Yes it is possible and it means that the array shouldn't be null when you query it. So [Type]! means you always get an array (empty or not), [Type!] is for a non-empty array or null, [Type!]! is always a non-empty array. Fun!

About

GraphQL API plugged into the old MySQL database of JeuxAmateurs (French website about amateur games)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published