English 中文(简体)
GraphiQL doesn t show date or allow formatString function in the browser Schema documentation explorer
原标题:

I m following the Gatsby tutorial in utilising its GraphQL data layer and there seems to be a mismatch between the commands they re outlining versus what s available in my own browser GraphiQL explorer.

Gatsby tutorial:

Under allMdx, open the nodes dropdown. Inside the frontmatter dropdown, you should see fields for all the keys you created in the frontmatter of your MDX files. Select the title and date fields. You can use the formatString argument on the date field to change the way your dates are displayed (see Syntax Hint below).

`
query MyQuery {
  allMdx {
    nodes {
      frontmatter {
        date
        title
      }
    }
  }
}
`

My own GraphiQL browser explorer: query MyQuery { allMdx { nodes { frontmatter { datePublished name } } } }

This is how it looks on my screen

Was there an update by the team at GraphQL? If that s the case, I can work with that. But when I try to apply the formatString function, it simply doesn t work with the new datePublished query. Any ideas?

How formatString appears on my screen

I ve tried utilising the new terms but formatString isn t working. I ve tried searching for any (new) documentation on it but can t find anything.

问题回答

暂无回答




相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签