resolvers filename_template not working #1925
Replies: 6 comments
-
@araufdogan I was trying to do this same thing with my resolvers where they would be split out into their respective files. Are you sure this functionality exists with gqlgen? I never had any luck.. |
Beta Was this translation helpful? Give feedback.
-
@ahummel25 I have no idea. I don't understand how filename_template works. If I need to create a new .graphqls file to using this, we can't split queries or mutations because the same type name allowed only for one file (can't define another query or mutation type in another graphqls file). Should I create the same resolvers where I want to do and redirect them? |
Beta Was this translation helpful? Give feedback.
-
I honestly don't know. I've just been creating my queries and mutations under something like |
Beta Was this translation helpful? Give feedback.
-
Hi, see here if this one helps you! |
Beta Was this translation helpful? Give feedback.
-
Hi @diep-it-dn , thanks for that issue link! But it still appears that there is some manual involvement in regards to deleting the originally generated file, right? I guess that's just how it is. |
Beta Was this translation helpful? Give feedback.
-
hi @ahummel25 |
Beta Was this translation helpful? Give feedback.
-
What happened?
I want to split resolvers by name.
What did you expect?
Split query and mutation resolvers by file name. I have two mutations named login and logout, It should generate two resolvers named login.resolvers.go, logout.resolvers.go. (I deleted the single resolver file before trying to generate it)
gqlgen.yml
Minimal graphql.schema and models to reproduce
versions
gqlgen version
? v0.13.0go version
? go1.14Beta Was this translation helpful? Give feedback.
All reactions