cubiql icon indicating copy to clipboard operation
cubiql copied to clipboard

Change dataset_ convention

Open RickMoynihan opened this issue 6 years ago • 0 comments

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.

RickMoynihan avatar Dec 01 '17 12:12 RickMoynihan