Skip to content

Instantly share code, notes, and snippets.

@sheppardjm
Created June 22, 2022 13:51
Show Gist options
  • Save sheppardjm/8d5f56bb451939383fc8a43ebb8cf7a0 to your computer and use it in GitHub Desktop.
Save sheppardjm/8d5f56bb451939383fc8a43ebb8cf7a0 to your computer and use it in GitHub Desktop.
Graphql type with unit argument field
type SoilTest {
id: ID!
fieldID: ID!
date: String
testID: String
ph: Float
p2o5(unit: p2o5Unit = LBS_PER_ACRE): Float
k2o(unit: k2oUnit = LBS_PER_ACRE): Float
om: Float
cec: Float
}
enum p2o5Unit {
LBS_PER_ACRE
PPM
}
enum k2oUnit {
LBS_PER_ACRE
PPM
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment