Gatsby: csv plugin parsing only single csv data

Created on 16 Aug 2018  路  1Comment  路  Source: gatsbyjs/gatsby

So i have my pathscsv which works fine with
```
{
pathsCsv {
id
path
}
}

but gives single result 
`{ id: '1', path: '/ford-ecosport-ambiente-1-5l-tdci' }`
and when i give a query according to the documentation like this
{
    pathsCsv {
      edges {
        node {
          id
          path
        }
      }
  }
}

`` It says edges not found in rootquery all i want it to parse is multiple propertices [{ id: '1', path: '/ford-ecosport-ambiente-1-5l-tdci' },{id: '2', path: '/tesla'}]`

Please help me out.

question or discussion

Most helpful comment

You need to query allPathsCsv to get all entries. pathsCsv (without all) will return single instance:

    {
-        pathsCsv {
+        allPathsCsv {
          edges {
            node {
              id
              path
            }
          }
      }
    }

>All comments

You need to query allPathsCsv to get all entries. pathsCsv (without all) will return single instance:

    {
-        pathsCsv {
+        allPathsCsv {
          edges {
            node {
              id
              path
            }
          }
      }
    }
Was this page helpful?
0 / 5 - 0 ratings