Strawberry-graphql: Difference between revisions
TobiasBora (talk | contribs) mNo edit summary |
TobiasBora (talk | contribs) Add websocket support |
||
| Line 4: | Line 4: | ||
=== Installation === | === Installation === | ||
To install it with all the packages needed for debugging purposes, you can start a nix shell like:<syntaxhighlight lang="bash"> | To install it with all the packages needed for debugging purposes, you can start a nix shell like:<syntaxhighlight lang="bash"> | ||
$ nix-shell -p "(python3.withPackages (ps: with ps; [ strawberry-graphql typer ] ++ strawberry-graphql.optional-dependencies.debug-server))" | $ nix-shell -p "(python3.withPackages (ps: with ps; [ strawberry-graphql typer ] ++ strawberry-graphql.optional-dependencies.debug-server ++ uvicorn.optional-dependencies.standard))" | ||
</syntaxhighlight>Then, you can create, as documented on strawberry's documentation, a minimal example like: | </syntaxhighlight>(if you do not need subscriptions, and therefore websockets, you can remove the <code>uvicorn.optional-dependencies</code>). | ||
Then, you can create, as documented on strawberry's documentation, a minimal example like: | |||
=== Minimal example === | === Minimal example === | ||