-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL? #35
Comments
We thought about GraphQL when we added the Data Extension API. |
@wetneb I'm curious why you thought in particular about Extension. |
Well, the data extension API is all about "returning user-selected properties from some records", which is what GraphQL is all about too, so this is where we saw a connection. A sample data extension query is here: https://reconciliation-api.github.io/specs/latest/#example-20 |
This is the analog in GraphQL. query extendData {
entity (where:{id:{IN:["10662041X","1064905412"]}}) {
id
variantName(limit:5)
geographicAreaCode(limit:1) {id}
professionOrOccupation {id name}
}
} The field params are not standardized. The response has exactly the same form as the query, so there's no {"data":
{"entity": [
{"id":"10662041X",
"variantName": ["Stryi-Leitgeb, Gerda","Leitgeb, Gerda Stryi-"],
"geographicAreaCode": ["http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"],
"professionOrOccupation": [
{
"id": "4037223-6",
"name": "Malerin"
},
{
"id": "4033430-2",
"name": "Künstlerin"
}
]
},
{"id": "1064905412",
"variantName": [],
"geographicAreaCode": ["http://d-nb.info/standards/vocab/gnd/geographic-area-code#XA-DE"],
"professionOrOccupation": [
{
"id": "4002844-6",
"name": "Architekt"
}
]
}
]
} GraphQL really shines if you fetch nested (related) objects because then you can specify exactly which fields of those objects to get. But people won't use nested objects to populate an OR column... |
I think GraphQL would be useful if you want to reconcile or fetch data from mutliple entity types. |
What would reconciliation look like with GraphQL? The query above makes sense for data extension, but what about reconciliation itself? |
GraphQL queries are typically small and don't usually carry big arrays of data. So I don't see it as a good fit for Recon |
#84 discusses breaking API changes to fix REST shortcomings |
GraphQL is a big fad nowadays (and http://platform.ontotext.com/ provides GraphQL over RDF data).
Does it have any relevance for the Reconciliation API?
I tend to vote no: it could simplify the API use a bit, but it'd have to support the old (REST) API anyway and there is one main client (OpenRefine), so I'd say it's not worth it.
The text was updated successfully, but these errors were encountered: