Skip to content

Commit

Permalink
Rename session function to reflect it returns the full GraphQL schema…
Browse files Browse the repository at this point in the history
… metadata
  • Loading branch information
sgrove committed Aug 8, 2022
1 parent c7cbb27 commit 87d454e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/oneGraphClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ export const friendlyEventName = (event: OneGraphCliEvent): string => {
case "OneGraphNetlifyCliSessionOpenFileEvent":
return `Open file ${payload.filePath}`;
default: {
if (__typename.startsWith("OneGraphNetlify")) {
return __typename.replace("OneGraphNetlify", "");
}
return `Unrecognized event (${__typename})`;
}
}
Expand Down Expand Up @@ -600,9 +603,8 @@ export const fetchEnabledServicesForApp = async (
* Fetch a list of what services are enabled for the given session
* @param {string} jwt The netlify jwt that is used for authentication
* @param {string} sessionId The session ID to query against
* @returns
*/
export const fetchEnabledServicesForSession = async (
export const fetchGraphQLSchemaForSession = async (
jwt: string,
siteId: string,
sessionId: string
Expand All @@ -617,8 +619,7 @@ export const fetchEnabledServicesForSession = async (
accessToken: jwt,
}
);
return appSchemaResult.data?.oneGraph?.netlifyCliSession.graphQLSchema
?.services;
return appSchemaResult.data?.oneGraph?.netlifyCliSession.graphQLSchema;
};

export type MiniSession = {
Expand Down

0 comments on commit 87d454e

Please sign in to comment.