Skip to content

feat: move object directive logic to object function#3308

Open
WingT wants to merge 1 commit into
99designs:masterfrom
WingT:master
Open

feat: move object directive logic to object function#3308
WingT wants to merge 1 commit into
99designs:masterfrom
WingT:master

Conversation

@WingT

@WingT WingT commented Sep 28, 2024

Copy link
Copy Markdown

Change-Id: I6d1789756f7990666f4a0e01761a94816f0fc996

Describe your PR and link to any relevant issues.
#3306
I have:

  • Added tests covering the bug / feature (see testing)
  • Updated any relevant documentation (see docs)

Change-Id: I6d1789756f7990666f4a0e01761a94816f0fc996
Comment thread codegen/field.go Outdated
}
for _, dir := range obj.Directives {
if dir.IsLocation(ast.LocationInputObject) {
dirs = append(dirs, dir)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why duplicate directives on LocationInputObject?

@StevenACoffman

StevenACoffman commented Sep 28, 2024

Copy link
Copy Markdown
Collaborator

I appreciate your working on this, but I actually really prefer to move logic out of the template files and back into library functions in standard Go files. Template logic is harder to maintain, as linters and other unit testing is much harder to deal with inside of templates.

I think your intent of making things simpler and more convenient is a good one though.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 58.865% (-0.02%) from 58.882%
when pulling 9569785 on WingT:master
into 7177055 on 99designs:master.

@StevenACoffman StevenACoffman self-requested a review as a code owner March 17, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants