Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for serverless demo #98

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Update README for serverless demo #98

wants to merge 4 commits into from

Conversation

mabuyo
Copy link
Contributor

@mabuyo mabuyo commented Jul 25, 2023

No description provided.

@codesandbox
Copy link

codesandbox bot commented Jul 25, 2023

This branch is running in CodeSandbox. Use the links below to review this PR faster.


CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

docs/serverless-demo.md Outdated Show resolved Hide resolved
@@ -53,7 +53,7 @@ subscription PlaybackStateSubscriberSubscription {
}
```

GraphOS Explorer also supports tabs. Open a new tab and try pausing the running subscription:
GraphOS Explorer also supports tabs. Open a new tab and run the operation below to pause the running subscription:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clarify: new Explorer tab. This should be the same window tab as when we ran the subscription above, to better see that it did indeed get paused.

Copy link
Contributor Author

@mabuyo mabuyo left a comment

Choose a reason for hiding this comment

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

Left some thoughts on why I made the changes I did, plus some questions (that are also in the friction log)

cc @michael-watson


> If you're new to Apollo, learn more about GraphOS in [our docs](https://www.apollographql.com/docs/studio/).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed so that they stay on the README page instead of getting distracted by the docs link.

In creating this demo, we've set up GraphOS to work with two GraphQL APIs we have hosted for you:

- _spotify_: Exposes the Spotify REST API
- _spotify_: Exposes the [Spotify REST API](https://developer.spotify.com/documentation/web-api)
- _playback_: Exposes subscriptions for playback functionality coming from the Spotify REST API including the associated `mutation` operations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This description is a mouthful but I didn't change it because I wasn't sure which were the important bits. Can we simplify to just "Spotify playback functionality"?


```gql
query RootWebsiteQuery($offset: Int, $limit: Int) {
query RoolWebsiteQuery($offset: Int, $limit: Int) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is RoolWebsiteQuery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OH was it supposed to be "Root"? I worked off the string in the Studio UI page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But "RootWebsite" is still not clear to me 😅

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is supposed to be the query that is used to load the initial page data. Any recommendations on what we would name there?

Copy link
Contributor Author

@mabuyo mabuyo Jul 25, 2023

Choose a reason for hiding this comment

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

Since this graph kind of exists outside of the client app, maybe we just name it what it's querying for? MyPlaylists?

(Shows up later on in the README as well)

@@ -42,7 +40,7 @@ query RootWebsiteQuery($offset: Int, $limit: Int) {
}
```

The Apollo Router also supports [GraphQL subscriptions](https://www.apollographql.com/docs/graphos/operations/subscriptions/)!
The [Apollo Router also supports GraphQL subscriptions](https://www.apollographql.com/docs/graphos/operations/subscriptions/)!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly add something about what this operation is doing? I'm actually not sure what this was doing / what it's listening for.

| `apollographql-client-version` | Increment this value with version numbers for your integration as its API usage changes. |
| Header name | Header value |
| ------------------------------ | ----------------------------------------------------------------------------------- |
| `apollographql-client-name` | The name of your client. |
Copy link
Contributor Author

@mabuyo mabuyo Jul 25, 2023

Choose a reason for hiding this comment

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

Is this a correct change? "client" vs "integration"

| Header name | Header value |
| ------------------------------ | ----------------------------------------------------------------------------------- |
| `apollographql-client-name` | The name of your client. |
| `apollographql-client-version` | Increment this value with version numbers for your client as its API usage changes. |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly add something about this being enterprise-only?

Copy link
Collaborator

Choose a reason for hiding this comment

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

great catch, we'll remove this


## Adding a new GraphQL API to GraphOS

You can view all of the GraphQL APIs in the [subgraphs tab]({{ graph.url.subgraphs }}). Try adding SpaceX to the demo by using the "Add a subgraph" button. You'll use https://spacex-production.up.railway.app/ for the routing URL and it should be able to fetch the subgraph schema/
You can view all of the GraphQL APIs in the Subgraphs page.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the link here until the shortcode is implemented https://apollographql.atlassian.net/browse/NEBULA-2562


## Understanding the usage of your graph

The Apollo Router automatically collects usage information on your graph based on what fields are being requested from client applications. You can start diving into specific fields and their usage in the graph by heading to the [Fields tab]({{ graph.url.fields }}).
The Apollo Router automatically collects usage information on your graph based on what fields are being requested from client applications. You can start diving into specific fields and their usage in the graph by heading to the [Fields page]({{ graph.url.fields }}).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made a lot of changes to refer to "page" instead of "tab"


📚 [The Apollo documentation](https://www.apollographql.com/docs/graphos) covers all things GraphOS.

✏️ Learn through hands-on tutorials [available on Odyssey, our GraphQL learning platform](https://www.apollographql.com/tutorials/browse?categories=GraphOS).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to plug Odyssey :)

@mabuyo mabuyo marked this pull request as ready for review July 25, 2023 21:57
@michael-watson
Copy link
Collaborator

I'm not quite sure GitHub isn't letting me get to the checks steps on this so I can merge.

I went ahead and included all these changes in a PR that adds the working demo scripts in PR #104

@jerelmiller
Copy link
Member

@michael-watson those checks are much better now and shouldn't block PRs anymore because they didn't run

@jerelmiller
Copy link
Member

@michael-watson is this a PR that can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants