-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow define projection fields in read model queries #1481
Allow define projection fields in read model queries #1481
Conversation
Apply Sweep Rules to your PR?
|
/integration sha=f759db3f44bbb758e31468a56d2c31972865b216 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
…on_fields_in_read_model_queries
/integration sha=ed4d1caa659a52b4745a5362cbe025848d193f75 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
…on_fields_in_read_model_queries # Conflicts: # common/config/rush/pnpm-lock.yaml # packages/framework-provider-local/src/services/read-model-registry.ts
…on_fields_in_read_model_queries
…on_fields_in_read_model_queries
/integration sha=fec44b84904d33b0a6617c5163dfd1b452d2adc0 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
…on_fields_in_read_model_queries # Conflicts: # common/config/rush/pnpm-lock.yaml
/integration sha=afd9d2be3ee9124c77b9b696aac6a73927921454 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What an great work @MarcAstr0 🥇 🥇🥇
packages/framework-core/src/services/graphql/graphql-generator.ts
Outdated
Show resolved
Hide resolved
packages/framework-core/src/services/graphql/graphql-generator.ts
Outdated
Show resolved
Hide resolved
if (part.endsWith('[]')) { | ||
const arrayField = part.slice(0, -2) | ||
if (!currentLevel[arrayField]) { | ||
currentLevel[arrayField] = {} |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
library input
} | ||
} else { | ||
if (!currentLevel[part]) { | ||
currentLevel[part] = {} |
Check warning
Code scanning / CodeQL
Prototype-polluting assignment Medium
library input
/integration sha=8726201 |
⌛ Integration tests are running... Check their status here 👈 |
…operties of the read model
✅ Integration tests have finished successfully! |
8726201
to
34ddffa
Compare
/integration sha=c4b7ca6c3c63ec64f2c0da97a408b21c8cbb1655 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
/integration sha=e38a5b6 |
⌛ Integration tests are running... Check their status here 👈 |
✅ Integration tests have finished successfully! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 Thanks for all the clarifications
Add the
select
method to project which fields you want to get in your read model query:The searcher result using
skipInstance
will generate an array of objects with thesku
anddescription
fields of theProductReadModel
read model. If you don't useskipInstance
the result will be an array ofProductReadModel
instances.Note: Using
skipInstance
will skip any Read Models migrations that need to be applied to the result. If you need to apply migrations to the result, don't useskipInstance
.