Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

WhereInput Interface missing for multi level relations #280

Closed
sapkra opened this issue Nov 11, 2018 · 10 comments
Closed

WhereInput Interface missing for multi level relations #280

sapkra opened this issue Nov 11, 2018 · 10 comments

Comments

@sapkra
Copy link

sapkra commented Nov 11, 2018

Description

I have a User which owns a Calendar and the Calendar has Entries.

CalendarEntryWhereInput is defined in UserResolvers & CalendarResolvers but it's missing in the CalendarEntryResolver.

It has to be in there because the CalendarEntry has a relation to the owning User.
Maybe one solution is to move these interfaces to a global scope so that all Resolvers are able to use the same interfaces.

Actual results

Cannot compile because an error is thrown.

Cannot find name 'CalendarEntryWhereInput'

Versions

  • graphqlgen: 0.3.0
  • OS name and version: Mac OS 10.14.1
@LawJolla
Copy link

Same issue, and for a TS neophyte like me, a show stopper.

@Esya
Copy link

Esya commented Nov 11, 2018

I've got the same issue as well, for now my solution was to manually copy paste the interface declaration, but of course when I run graphqlgen next time I'll need to do it again..

@Weakky
Copy link
Contributor

Weakky commented Nov 11, 2018

Hey everyone,

#267 should normally fix the problem and will land very soon with the next release 🙏

@LawJolla
Copy link

Thanks @Weakky ! In the interim, do you have a work around suggestion for a huge Prisma schema? I'm unable to spin up the server. Thanks for any suggestions! (I'm new to Typescript, and thus far. can't figure out why I'm still using it)

@sapkra
Copy link
Author

sapkra commented Nov 12, 2018

Downgrade graphqlgen until it's working. 😉

@LawJolla
Copy link

@sapkra the older versions don't properly scaffold nested resolvers.

Probably time to build out in JS and return when the project matures.

@JensMadsen
Copy link

if downgraded to 0.2.7 it kind of works for me :-)

@Dorkside
Copy link

This is a dealbreaker for us too, would be great to have a release with this feature fixed. Our deeply nested model goes kaBOOM. Thanks for the great work.

@Weakky
Copy link
Contributor

Weakky commented Nov 14, 2018

Hey 👋,

This should now be fixed by [email protected].

Could you please confirm? Thanks!

@viktorshamal
Copy link

I had the same issue and it fixed it for me 👍

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

No branches or pull requests

8 participants