From aeeb941e6866c2d5af8ef50fc50a0ed7b6e11ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0o=C5=A1i=C4=87?= Date: Sat, 13 Sep 2025 15:45:06 +0200 Subject: [PATCH 1/2] Clarified context passing for queries when used from server Clarified instructions for authenticated Queries regarding context object usage. --- .../version-0.17.0/data-model/operations/queries.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/versioned_docs/version-0.17.0/data-model/operations/queries.md b/web/versioned_docs/version-0.17.0/data-model/operations/queries.md index 1ecd1915b0..fa5f102980 100644 --- a/web/versioned_docs/version-0.17.0/data-model/operations/queries.md +++ b/web/versioned_docs/version-0.17.0/data-model/operations/queries.md @@ -271,7 +271,8 @@ Calling a Query on the server is similar to calling it on the client. Here's what you have to do differently: - Import Queries from `wasp/server/operations` instead of `wasp/client/operations`. -- Make sure you pass in a context object with the user to authenticated Queries. +- Make sure you pass in a `context` object with the `user` to authenticated Queries. + - Note that you don't have to pass other parts of the `context` object, like Entities, those will get injected automatically. From 3993402f63be4c1622931822ca824caed4826d4e Mon Sep 17 00:00:00 2001 From: Martin Sosic Date: Thu, 2 Oct 2025 13:06:49 +0200 Subject: [PATCH 2/2] fix --- web/docs/data-model/operations/queries.md | 3 ++- .../version-0.17.0/data-model/operations/queries.md | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/docs/data-model/operations/queries.md b/web/docs/data-model/operations/queries.md index 1ecd1915b0..e5a1c5b049 100644 --- a/web/docs/data-model/operations/queries.md +++ b/web/docs/data-model/operations/queries.md @@ -271,7 +271,8 @@ Calling a Query on the server is similar to calling it on the client. Here's what you have to do differently: - Import Queries from `wasp/server/operations` instead of `wasp/client/operations`. -- Make sure you pass in a context object with the user to authenticated Queries. +- Make sure you pass in a `context` object with the `user` field to authenticated Queries. + - Note that you don't have to pass other parts of the `context` object, like Entities, those will get injected automatically. diff --git a/web/versioned_docs/version-0.17.0/data-model/operations/queries.md b/web/versioned_docs/version-0.17.0/data-model/operations/queries.md index fa5f102980..1ecd1915b0 100644 --- a/web/versioned_docs/version-0.17.0/data-model/operations/queries.md +++ b/web/versioned_docs/version-0.17.0/data-model/operations/queries.md @@ -271,8 +271,7 @@ Calling a Query on the server is similar to calling it on the client. Here's what you have to do differently: - Import Queries from `wasp/server/operations` instead of `wasp/client/operations`. -- Make sure you pass in a `context` object with the `user` to authenticated Queries. - - Note that you don't have to pass other parts of the `context` object, like Entities, those will get injected automatically. +- Make sure you pass in a context object with the user to authenticated Queries.