You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to bind a model to a resolver so that a new generated.Resolver is made. Everything is happening as expected except the name is lowercase and I of course can't access anything in the generated package that is private
What did you expect?
A resolver to be generated that is exported
Minimal graphql.schema and models to reproduce
From further testing, the culprit is the fact that I have listed type post instead of type Post. Once I capitalize it in the schema, it capitalizes it in the generated file. The strange thing is that I have a lot of lower case schema declarations that are generated properly
- schema/**/*.graphql
- schema/*.graphql
exec:
filename: graph/generated/generated.go
package: generated
resolver:
filename: resolver/resolver.go # where to write them
type: Resolver # what's the resolver root implementation type called?
model:
filename: models/generated.go
package: models
struct_tag: json
autobind:
- "github.com/launchpadcentral/test/models"
models:
engagement:
model: github.com/launchpadcentral/test/models.Post
models.Post:
// Post ..
type Post struct {
Title string `json:"title"
}
schema:
type post {
title: String!
projectName: String!
This discussion was converted from issue #1471 on January 19, 2022 14:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What happened?
I am trying to bind a model to a resolver so that a new generated.Resolver is made. Everything is happening as expected except the name is lowercase and I of course can't access anything in the generated package that is private
What did you expect?
A resolver to be generated that is exported
Minimal graphql.schema and models to reproduce
From further testing, the culprit is the fact that I have listed type post instead of type Post. Once I capitalize it in the schema, it capitalizes it in the generated file. The strange thing is that I have a lot of lower case schema declarations that are generated properly
this generates the following
versions
gqlgen version
? latestgo version
? 1.16Beta Was this translation helpful? Give feedback.
All reactions