Giter Site home page Giter Site logo

Comments (6)

TriPSs avatar TriPSs commented on September 27, 2024 1

Thanks, if you update one field in PartPriceDTO to have FilterableField it will work.

from nestjs-query.

TriPSs avatar TriPSs commented on September 27, 2024

Think you need to remove:

 @FilterableField(() => [PartPriceDTO])
  partPrice: PartPriceDTO[];

As that is already done by the @UnPagedRelation('partPrice', () => PartPriceDTO)

You would also need to add the id fields, otherwise the mapper will not be able to map to the correct entities.

@ManyToOne((): ObjectType<PartEntity> => PartEntity, (part) => part.partPrice)
@JoinColumn({ name: 'part_id' })
part!: PartEntity;

@Column({ name: 'part_id' })
partId!: PartEntity;

from nestjs-query.

KCH0000 avatar KCH0000 commented on September 27, 2024

Thanks for the help
I deleted

@FilterableField(() => [PartPriceDTO])

and did not delete it

partPrice: PartPriceDTO[];

so that Resolver would not output a type error in Entity and DTO

and rename fied part -> partId, to avoid making a record

@Column({ name: 'part_id' })
partId!: PartEntity;
Error: No fields found to create GraphQLFilter for PartPriceDTO

I'm trying very hard, but I don't understand how it works :)

from nestjs-query.

TriPSs avatar TriPSs commented on September 27, 2024

Hmm, could you create repo with the issue? Then I can check it out for ya.

from nestjs-query.

KCH0000 avatar KCH0000 commented on September 27, 2024

https://github.com/KCH0000/graphgq-nest-issue

from nestjs-query.

KCH0000 avatar KCH0000 commented on September 27, 2024

Oh my God). Thank you so much, you saved me a lot of time. I would never have guessed before these changes.

from nestjs-query.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.