- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
CoreHeadingBlock
        Daniel Milner edited this page Sep 3, 2019 
        ·
        1 revision
      
    This component displays heading blocks from Gutenberg.
import { CoreHeadingBlock ] from 'wp-block-components';<CoreHeadingBlock attributes={{
    content: 'This is a heading',
    align: null,
    anchor: null,
    className: null,
    level: 2
  }} />You can use the following GraphQL fragment to retrieve the appropriate fields from WPGraphQL.
... on CoreHeadingBlock {
    name
    attributes {
      __typename
      ... on CoreHeadingBlockAttributes {
        align
        anchor
        className
        content
        level
      }
    }
  }Both CoreHeadingBlock and CoreHeadingBlockAttributes may have an additional prefix. For example, if you are using Gatsby, you may have named your WPGraphQL source WPGraphQL, so CoreHeadingBlock would become WPGraphQL_CoreHeadingBlock, etc.