1

I walk through some tutorials of GraphQLJS that uses graphql-tools package, with makeExecutableSchema command, some others that use graphql package using a new GraphqlSchema (as object), other with the same graphql package but the command buildSchema.

Well, the three seems to work fine ( ok, they are just building schemas in different ways. ).

Question : Is one that is somehow related to "best practice" or results in "best performance" ? Or this is definitely something i shouldn't be worried about?

Thank you :)

1 Answers1

1

I think it really doesn't matter and you should use whatever you and your tooling are most comfortable with.

It can matter if, for example, you would use that same schema for Relay also. Since Relay Compiler uses template literals (`...`) syntax for schema it is easier if that is on the server side too.

I am using buildSchema() as it's easy to track in version control and I don't need to add things to schema dinamycally.

Andrija Ćeranić
  • 1,633
  • 11
  • 14