Answer the question
In order to leave comments, you need to log in
How to get id from table in graphene?
Hello!
I am making a request like this
{
all_books(first: 1) {
edges {
node {
id
title
}
}
}
}
{
"data": {
"all_books": {
"edges": [
{
"node": {
"id": "Qm9va05vZGU6NDc2NDk1",
"title": "Скромный герой"
}
}
]
}
}
}
Answer the question
In order to leave comments, you need to log in
So far, I have found a solution, use from_global_id on the client side
from graphql_relay.node.node import from_global_id
from_global_id(node['id'])[1]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question