Single resource fields

When you want to fetch just one resource of a given type, you can use the single resource fields. As explained in the types section, the name of these fields is the camelcased version of the content type from which they derive or asset.

1type Query {
2 contentModule(id: "introduction") {
3 # ...
4 }
5 asset(id: "my-picture") {
6 # ...
7 }
8}

Arguments

The following arguments are available when querying a single resource:

ArgumentTypeRequiredDescription
idStringtrueThe id of the resource you want to fetch.
previewBooleanfalsewhen set to true the field will be resolved with non published content. The default is false.
localeStringfalselocale for the resource. If not set, the default locale is used.
useFallbackLocaleBooleanfalsewhen set to false, fields without a value in the requested locale return null instead of the fallback locale. The default is true. See the Disabling locale fallback section.