sst 2.8.24 → 2.8.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/constructs/Api.js CHANGED
@@ -586,6 +586,7 @@ export class Api extends Construct {
586
586
  }, postfixName);
587
587
  const data = this.routesData[routeKey];
588
588
  if (data.type === "function") {
589
+ data.function.addEnvironment("GRAPHQL_ENDPOINT", routeKey.split(" ")[1]);
589
590
  this.routesData[routeKey] = {
590
591
  ...data,
591
592
  type: "graphql",
@@ -1,7 +1,10 @@
1
1
  import { createYoga } from "graphql-yoga";
2
2
  import { Handler, useEvent, useLambdaContext } from "../../context/handler.js";
3
3
  export function GraphQLHandler(options) {
4
- const yoga = createYoga(options);
4
+ const yoga = createYoga({
5
+ graphqlEndpoint: process.env.GRAPHQL_ENDPOINT,
6
+ ...options,
7
+ });
5
8
  return Handler("api", async () => {
6
9
  const event = useEvent("api");
7
10
  const parameters = new URLSearchParams(event.queryStringParameters || {}).toString();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.8.24",
4
+ "version": "2.8.25",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },