Builtin server
Sometimes you need to quickly prototype an API and donβt really need to use a framework like Flask or Django.
Strawberryβs built in server helps with this use case. It allows to quickly have a development server by running the following command:
where schema
is the name of a Strawberry schema symbol and package.module
is
the qualified name of the module containing the symbol. The symbol name defaults
to schema
if not specified.
When running that command you should be able to see a GraphiQL playground at this url http://localhost:8000/graphql .
Automatic reloading
Strawberryβs built in server automatically reloads when changes to the module
containing the schema
are detected. This way you can spend more time
prototyping your API rather than restarting development servers.
Disabling operation logging
By default Strawberryβs built in server logs all operations that are executed. This can be useful for debugging but can also be annoying if you are prototyping.
To disable operation logging you can use the --log-operations
configuration
flag: