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.

FieldScopedVariableResolver expect dictionary parent

See original GitHub issue

Describe the bug When creating an extended stitched schema using the $fields option during delegation won’t work if the type is from the extended schema and not a remote schema. This is because FieldScopedVariableResolver expects context.Parent to be IReadOnlyDictionary<string, object> and not a regular C# object.

To Reproduce In a stitched schema extensions have something that looks like

extend type Query {
  product(productKey: String!): Product!
}

type Product {
	productKey: String!

	orders(customerKey: String): [Order!]!
		@delegate(schema: "commerce", path: "orders(productKey: $fields:productKey, customerKey: $arguments:customerKey)")
}

When executing a query that uses the above we see the message

Unable to cast object of type ‘Experiments.GraphQL.Schemas.Extensions.Product’ to type ‘System.Collections.Generic.IReadOnlyDictionary`2[System.String,System.Object]’.

Expected behavior Would expect the query to be able to use the Product field data in the delegated query.

Using Hot Chocolate 0.8.0.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
michaelstaibcommented, Mar 25, 2019

I will fix that in 0.8.1 so that we call the field resolver instead.

0reactions
michaelstaibcommented, Sep 26, 2020

This one is outdated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Foster parent Definition & Meaning
a foster father or foster mother.
Read more >
Biological parent Definition & Meaning
a parent who has conceived (biological mother ) or sired (biological father ) rather than adopted a child and whose genes are therefore...
Read more >
Parent Definition & Meaning
Biology. pertaining to an organism, cell, or complex molecular structure that generates or produces another: parent cell; parent DNA.
Read more >
Parenting Definition & Meaning
Parenting definition, the rearing of children: The schedule allows her very little time for parenting. See more.
Read more >
Helicopter parent Definition & Meaning
Helicopter parent definition, a parent who is excessively involved in the life of his or her child See more.
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