DPDK Architecture  ->  Library (v3.4.4)

Gql

gql is a core utility that should be placed before every GraphQL query.

It handles injected parameters under the hood and allows for syntax highlighting and formatting.

import hydrate from '@dpdk/library/utilities/hydrate';
import gql from '@dpdk/library/utilities/gql';

function ReferenceSection({ content_block }) {
  return <h1>The queried content block is available directly</h1>;
}

ReferenceSection.getQuery = ({ sectionData }) => gql`{ 
  content_block(filter: { nid: "${sectionData.reference.nid}" }) { 
    title 
  } 
}`;
Last modifiedMonday, August 30, 2021, 2:00:02 PM UTC
Last authorColin van Eenige
Commit IDfd08685