Skip to content
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

[Epic:.NET] Align all the build-in DTOs that appear in the UI under the entity-related-modules (e.g. CustomerFindManyArgs) VS the actual dotnet DTOs #8556

Open
Tracked by #8336
mulygottlieb opened this issue May 28, 2024 · 5 comments · Fixed by #8713
Assignees

Comments

@mulygottlieb
Copy link
Member

mulygottlieb commented May 28, 2024

We need to decide which "way" to align - either change the dotnet generated code to use the same DTOs we use for Nest (that appear in the UI), or - change the auto-created-DTOs in the server according to the chosen tech-stack for the service (align the blocks and UI to the actual generated code).
This needs to be discussed internally first (Mango)

@overbit
Copy link
Contributor

overbit commented Jun 12, 2024

This needs to be reviewed as the current generation is not using the same DTOs @mulygottlieb @morhag90.

Ideally we will replace the currently generated DTOs with the ones defined in the amplication platform

@mulygottlieb mulygottlieb changed the title [Epic:.NET] Generate all the build-in DTOs that appear in the UI under the entity-related-modules (e.g. CustomerFindManyArgs) [Epic:.NET] Align all the build-in DTOs that appear in the UI under the entity-related-modules (e.g. CustomerFindManyArgs) VS the actual dotnet DTOs Jun 13, 2024
@overbit overbit self-assigned this Jun 14, 2024
@mulygottlieb mulygottlieb self-assigned this Jun 17, 2024
@mulygottlieb
Copy link
Member Author

Moving this back into "Todo" until we have the discussion which side to align to which side

@overbit overbit removed their assignment Jun 17, 2024
@mulygottlieb
Copy link
Member Author

mulygottlieb commented Jun 23, 2024

Tech notes for implementation:
Server:

  • Filter out GQL-only DTOs in the server in the ModuleDTO Resolver

Dotnet DSG:

  • Rename non-GQL DTOs to the names we have in the server
  • Change the [Entity]IdDto - rename, do not inherit in the [Entity] DTO and instead add the id with its id-type directly

Dotnet Plugins

  • Review existing dotnet plugins for use of the DTOs names and in particular in the IdDto

@morhag90
Copy link
Member

Passed QA:

Forbbiden:
image

Authorize + FindOne => Not Found:
image

Create One entity:

image

FindMany:

image

Get one entity:

image

Create one entity with another entity relation:

image

The other side:

image

@mulygottlieb mulygottlieb linked a pull request Jun 25, 2024 that will close this issue
2 tasks
@mulygottlieb
Copy link
Member Author

Retuning to qa just to qa the dto filtering in the server as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants