hygraph / gatsby-source-graphcms

The official Gatsby source plugin for GraphCMS projects
https://graphcms.com
MIT License
145 stars 41 forks source link

Support for environment variables? #60

Closed marcaaron closed 6 years ago

marcaaron commented 6 years ago

Is there a current workaround for the need for an absolute url endpoint? Attempts to pass process.env.* fail with error.

Redmega commented 6 years ago

You should be able to use env. vars. For example that's how I'm using:

process.env.GRAPHCMS_TOKEN.

What is the error you're getting? How are you declaring the env var?

marcaaron commented 6 years ago

Ok! I think it must have been a silly typo. Seems to be working now.