cubiql
cubiql copied to clipboard
Change dataset_ convention
The convention we have of prefixing dataset_
to dataset names is just a way of avoiding collisions on field names in graphql. An alternative (perhaps more elegant) approach would be to nest datasets under a dataset
field, e.g. instead of:
{
dataset_births {
description
}
dataset earnings {
description
}
}
We could do:
{
dataset {
births { description }
earnings { description }
}
}
Obviously if graphql ever gets namespaces https://github.com/facebook/graphql/issues/163 we could use those.