Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphError: Parsing OData Select and Expand #26

Open
madmonkeyworks opened this issue Nov 30, 2021 · 2 comments
Open

GraphError: Parsing OData Select and Expand #26

madmonkeyworks opened this issue Nov 30, 2021 · 2 comments
Assignees

Comments

@madmonkeyworks
Copy link

madmonkeyworks commented Nov 30, 2021

Hi,

I'm getting this error:

GraphError: Parsing OData Select and Expand failed: Term
'ID,JobID,Position,Company,Function,Office,Job Type,WorkingHours,
JobStartDate,JobClosingDate,Experience,ShortDescription,ContactPe
rsonName,ContactPersonEmail,JobDescription,Created,Modified' is
not valid in a $select or $expand expression.

To Reproduce
Steps to reproduce the behavior:

  1. install the plugin with npm i gatsby-source-sharepoint-online --save

  2. Register app under main tenant (get app id and secret) + Grant access (Read.all)

  3. edit gatsby-config.js
    Specify lists as e.g.
    ...
    lists: [
    {
    title: "Vacancies",
    fields: ["ID", "Job ID", "Position", "Company", "Function", "Office", "Job Type", "Working Hours", "Job Start Date", "Job Closing Date", "Experience", "Short Description", "Contact Person Name", "Contact Person Email", "Job Description", "Created", "Modified"],
    }
    ]

  4. run gatsby develop
    Returns error: GraphError: Parsing OData Select and Expand failed: Term
    'ID,JobID,Position,Company,Function,Office,Job Type,WorkingHours,
    JobStartDate,JobClosingDate,Experience,ShortDescription,ContactPe
    rsonName,ContactPersonEmail,JobDescription,Created,Modified' is
    not valid in a $select or $expand expression.

Expected behavior
I'd expect graphql fields available.

Info
Gatsby CLI version: 4.2.0
Gatsby version: 4.2.0

@madmonkeyworks madmonkeyworks changed the title No gatsby nodes generated GraphError: Parsing OData Select and Expand Nov 30, 2021
@madmonkeyworks
Copy link
Author

Plugin works with no fields defined in gatsby-config, ie fields: [].
I suspect a bug in /src/resource.js, line 58

@tangytang
Copy link

Hi I can confirm I am facing the same problem.

It appears when the sharepoint column contains a spacing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants