You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, @ardatan. My goal is simple. I want to connect my "accessToken" in the TS file with YAML headers. I have already seen some examples available in our repo. I attempted in the same manner, but I received a bad credential error. If I pass the same "accessToken" in the YAML file, it works perfectly. Just give your input if I am doing anything wrong. I'm adding a code snippet FYR.
I am sharing the screenshots.
The text was updated successfully, but these errors were encountered:
schemaHeaders are called once during mesh build so before execution to fetch the schema. Apparently there is no context yet so you can only access environment variables using env.. In order to build Mesh artifacts, you should provide an introspection to Mesh. There are 2 options to fix this;
If the actual endpoint is behind an auth, you can provide an env var {env.MY_TOKEN} just for build then use artifacts as usual.
You can use introspection.
For example, it is introspection: https://docs.github.com/public/schema.docs.graphql in this case
I think you got confused because of its missing in the documentation. Sorry for that. We already have this issue to add this information to docs; #4106
Hello, @ardatan. My goal is simple. I want to connect my "accessToken" in the TS file with YAML headers. I have already seen some examples available in our repo. I attempted in the same manner, but I received a bad credential error. If I pass the same "accessToken" in the YAML file, it works perfectly. Just give your input if I am doing anything wrong. I'm adding a code snippet FYR.
I am sharing the screenshots.
The text was updated successfully, but these errors were encountered: