Skip to main content

GraphQLFields

Derive Macro GraphQLFields 

Source
#[derive(GraphQLFields)]
{
    // Attributes available to this derive:
    #[graphql]
}
Expand description

Derive GraphQLFields for a struct.

Each field becomes a GraphQL selection entry:

  • Plain fields โ†’ camelCaseName
  • #[graphql(nested)] fields โ†’ camelCaseName { <InnerType::selection()> }

ยงStruct-level attributes

  • #[graphql(full_type = Path)] โ€” enables compile-time validation against the specified generated type. Without this, FullType = Self and no validation is performed (used by codegen for full types).