Skip to content

Using ProxyQueryService with a custom CreateOneInputType #253

Answered by TriPSs
abrenoch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @abrenoch,

Sorry that it took me a while but I figured it out, the thing is that this is actually expected behavior. What you could do is use the normal TypeORMQueryService (or keep what you have, but update it to receive DeepPartial<AssetEntity>) and add the following to the AssetModel

@BeforeCreateOne((input: CreateOneAssetInputDTO) => {
  console.log('asset', input.input);
  console.log('filePath', input.filePath);
  return input;
})

Here you can update the input (that is send the service), do checks etc.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@abrenoch
Comment options

@TriPSs
Comment options

@abrenoch
Comment options

@TriPSs
Comment options

Answer selected by abrenoch
@abrenoch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants