Giter Site home page Giter Site logo

Accessing env variables about gatsby-mail HOT 7 OPEN

sinsedrix avatar sinsedrix commented on May 28, 2024
Accessing env variables

from gatsby-mail.

Comments (7)

DSchau avatar DSchau commented on May 28, 2024 1

And you've validated that GITHUB_API_TOKEN is in fact valid and has the right scopes right?

You can feel free to message me a zip of your project or something on Twitter (schaudustin) or e-mail at dustin @ gatsbyjs dot com

from gatsby-mail.

DSchau avatar DSchau commented on May 28, 2024

This line means that .env.development will be sourced.

Are you sure you created a token with the correct scopes required as per the README?

from gatsby-mail.

sinsedrix avatar sinsedrix commented on May 28, 2024

Yes, I have a token from onegraph with the app id.
In fact, I had the following error at first:

...\gatsby-mail\src\components\footer.js
61:11 error Cannot query field "github" on type "Query" graphql/template-strings

So I removed the github attribute from FooterQuery to see where the problem came from and saw the program couldn't join the graphql api.

from gatsby-mail.

DSchau avatar DSchau commented on May 28, 2024

Right -- that error would be because the Github schema wasn't sourced (401) and so the github schema wasn't stitched in.

Could you paste your .env.development file with the secrets replaced?

from gatsby-mail.

sinsedrix avatar sinsedrix commented on May 28, 2024

Here it is:

# move this to .env.development to develop locally!
# conversely .env.production if building locally
GATSBY_OG_APP_ID=96a66e07-08c8-480e-b0f5-5c7617987ec3
# https://github.com/settings/tokens
GITHUB_API_TOKEN='xxx'

from gatsby-mail.

sinsedrix avatar sinsedrix commented on May 28, 2024

I created a personal token on https://github.com/settings/tokens and another on https://www.onegraph.com/. I don't know which one I'm meant to use or how to validate it. :/

from gatsby-mail.

sinsedrix avatar sinsedrix commented on May 28, 2024

You can feel free to message me a zip of your project or something on Twitter (schaudustin) or e-mail at dustin @ gatsbyjs dot com

I didn't change anything from your original repo, I just want to see how it works. The problem seems to be related to the access to env variables or the access to graphql.

from gatsby-mail.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.