Мой тип выглядит следующим образом:
Код: Выделить всё
[Node]
public class Speaker
{
[ID]
public int Id { get; set; }
public string? Name { get; set; }
public string? Bio { get; set; }
public virtual string? WebSite { get; set; }
public ICollection SessionSpeakers { get; set; } = new List();
}
Код: Выделить всё
query {
node(id: 1) {
id
... on Speaker {
bio
id
name
webSite
}
}
}
Код: Выделить всё
The argument literal representation is HotChocolate.Language.IntValueNode which is not compatible with the request literal type HotChocolate.Language.StringValueNode
Код: Выделить всё
query {
node(id: "1") {
id
... on Speaker {
bio
id
name
webSite
}
}
}
Код: Выделить всё
Unable to decode the id string.
Код: Выделить всё
Unable to decode the id string.
Код: Выделить всё
query {
node(id: "U3BlYWtlcjE=") {
... on Speaker {
bio
id
name
webSite
}
}
}
Я пишу конечную точку Graphql для службы, которая использует int для идентификатора. Как лучше всего это сделать?
Подробнее здесь: https://stackoverflow.com/questions/787 ... f-integers