camelCase
. Many GraphQL clients are written in JavaScript, Java, Kotlin, or Swift, all of which recommend camelCase for variable names.PascalCase
. This matches how classes are defined in the languages mentioned above.PascalCase
.ALL_CAPS
, because they are similar to constants.plural
name.createAnimal
is preferable to animalCreate
.resolvers
will be merged into a shared api
, we need to come up with a system to avoid overwriting previous resolvers. Let's take this example to understand the problem better.ProjectX
and ProjectY
. Both of these projects need to query a user
, but the user type references a different resource.ProjectX
's resolvers are merged first with the user
query that fetches users from the National Registry
.ProjectY
's resolvers are merged after with the user
query that fetches users from the RSK
.ProjectY
's user query will overwrite the ProjectX
's query and will break ProjectX
.Mutations
, Queries
, Types
, Scalars
, etc. with the name of the module that is merged into the api
.