question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explicit binding behavior dont work in v13

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

Product

Hot Chocolate

Describe the bug

Changing DefaultBindingBehavior to BindingBehavior.Explicit does not effect the behavior and all fields are bound implicit. I would expect that at least Author and Book type would have no fields bound and that a ObjecTypeDescriptor would be created defining the fields.

Steps to reproduce

  1. dotnet new graphql
  2. append
ModifyOptions(opt =>
{
    opt.DefaultBindingBehavior = BindingBehavior.Explicit;
});

Relevant log output

No response

Additional Context?

No response

Version

13.0.0-rc.1

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Reactions:1
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelstaibcommented, Feb 1, 2023

So… we have discussed this quite a bit now and will rework this.

Types with attributes will always bind implicitly since its an explicit decision in this case to bind implicit. Its equivalent to ‘BindFieldsImplicitly()’ on a type that overrides the default behavior.

Types that however have no attribute will bind explicitly like before. While it could be desirable to have even more fine grained control over the type inference it becomes also all more complex.

We will ship it with rc.5 and it feels quite well balanced now.

0reactions
jarlefcommented, Feb 2, 2023

Sounds good Looking forward to testing it out. 👍 You guys are doing really excellent work on both cool new features and videos tutorials 🥇

Read more comments on GitHub >

github_iconTop Results From Across the Web

Global explicit binding behaviour not working with Hot ...
I have a project, where I use Hot Chocolate for a GraphQL API. I create everything like this: private static void Main(string[] args)...
Read more >
Explicit Binding - Advanced JavaScript
The explicit binding rule allows developers to use the "call" method and pass an explicit reference for the "this" binding. Explicit bindings can...
Read more >
Behavior changes: Apps targeting Android 14 or higher
Apps must either use an explicit intent to deliver to unexported components, or mark the component as exported. If an app creates a...
Read more >
JavaScript “This” Keyword and How to Implement It
Explicit Binding. This binding is used when one needs to pressurize the function to use a particular object as its context. It can...
Read more >
Binding syntax
Data binding works with properties of DOM elements, components, and directives, ... Some HTML attributes don't have corresponding properties; for example,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found