Skip to content

NEBULA-701 Add includeCookies field to apollo-server#6014

Merged
glasser merged 6 commits into
apollographql:mainfrom
SilverMaiden:hsummit/include-cookies
Jan 25, 2022
Merged

NEBULA-701 Add includeCookies field to apollo-server#6014
glasser merged 6 commits into
apollographql:mainfrom
SilverMaiden:hsummit/include-cookies

Conversation

@SilverMaiden

Copy link
Copy Markdown
Contributor

This PR is the final code change part of NEBULA-701 - updating apollo server to accept the includeCookies option from LandingPageConfig.

Studio-ui PR with more context

JIRA

@codesandbox-ci

codesandbox-ci Bot commented Jan 19, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f97b6f2:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

document?: string;
variables?: Record<string, string>;
headers?: Record<string, string>;
includeCookies?: boolean;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the doc comment above document to mention this (or better, split it up so each of the four options here have a doc comment since that's how doc comments work).

Ideally you should also add this to LandingPageConfig as well as to the two lines that look like

  const { version, __internal_apolloStudioEnv__, footer, ...rest } = options;

as explained in the comment above them. Those lines should probably also have document, variables, and headers added, oops... I guess we're kind of in the "haven't quite updated the plugin yet" state for them. The model here is a bit odd but basically works.

Please also update the doc website in docs/source/api/plugin/landing-pages.md. There's a README in docs explaining how to run the docs site locally; you can also see a Netlify deployment preview on the PR checks section.

@glasser glasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other note: we'll need to include this in CHANGELOG.md. Feel free to add a line yourself or I can do it when I merge it.

*/
document?: string;
/**
* Folks can configure their landing page to link to Studio Explorer with

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that it's written four times I'm starting to wonder if "folks can" is the best way to start a doc string. I kinda love it and I kinda hate it. What do you think?

Comment thread docs/source/api/plugin/landing-pages.md Outdated

A boolean used to set whether cookies are included in the Studio Explorer's editor on load.

If you omit this, the Explorer defaults includeCookies to 'false' or the current user setting.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

includeCookies should probably be in backticks here. probably false too.

Comment thread docs/source/api/plugin/landing-pages.md Outdated
</td>
<td>

A boolean used to set whether cookies are included in the Studio Explorer's editor on load.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could a bit more explicit, like, "A boolean used to set whether Studio Explorer should include cookies in its GraphQL requests to your server." ?

@glasser glasser force-pushed the hsummit/include-cookies branch from c44e737 to f97b6f2 Compare January 25, 2022 00:11
@glasser

glasser commented Jan 25, 2022

Copy link
Copy Markdown
Member

Looks good to me @SilverMaiden ! I'll add a CHANGELOG entry and merge it.

@uripre

uripre commented Feb 25, 2022

Copy link
Copy Markdown

That's awesome, thanks!!

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants