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.

SchemaException when type has Equals method

See original GitHub issue

I implemented method Equals in my class:

public class Test
{
    public override Equals(object obj) => true;
}

Then I created ObjectType:

public class TestType
  : ObjectType<Test>
{
  public override void Configure(IObjectTypeDescriptor<Test> desc)
  {
    desc.Field(x => x.Equals(default)).Ignore();
  }
}

When I run the project I get the following error: HotChocolate.SchemaException : The type `System.Object` of field `Test.obj` could not be resolved to a valid schema type. - Type: Test at HotChocolate.Schema.CreateSchema(SchemaContext context, Action`1 configure) at Renta.Tests.Mock.SchemaMock.CreateSchema(IServiceProvider provider) in

This is a bug?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Aug 26, 2018

It is a bug … I will fix it and make a release. I think you will have the fix by tomorrow.

0reactions
Dolfik1commented, Aug 27, 2018

@michaelstaib thanks, for fast fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SchemaException when type has Equals method #229
I implemented method Equals in my class: public class Test { public override Equals(object obj) => true; } Then I created ObjectType: public ......
Read more >
Overriding the java equals() method - not working?
In Java, the equals() method that is inherited from Object is: public boolean equals(Object other);. In other words, the parameter must be ...
Read more >
java - Is it a good idea to have logic in the equals method ...
An equality operator will claim that two objects are equal if and only if they should be considered equal, due to whatever considerations...
Read more >
SchemaException (midPoint API Distribution 4.0 API)
Returns a human-readable message that describes the type or class of errors that the exception represents. QName · getPropertyName(). Methods inherited from ...
Read more >
FeatureTypes (Geotools modules 29-SNAPSHOT API)
This method depends on the correct implementation of FeatureType equals ... Whether the feature type has the specified name, or is a descendent...
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