Skip to content

New recipe: Call endpoints from the server#3202

Merged
TheOtterlord merged 10 commits into
withastro:mainfrom
TheOtterlord:server-endpoints
Jul 26, 2023
Merged

New recipe: Call endpoints from the server#3202
TheOtterlord merged 10 commits into
withastro:mainfrom
TheOtterlord:server-endpoints

Conversation

@TheOtterlord
Copy link
Copy Markdown
Member

What kind of changes does this PR include?

  • New or updated content

Description

@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2023

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9d8824d
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/64c11ba011652300089acd20
😎 Deploy Preview https://deploy-preview-3202--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding this @TheOtterlord! I believe it might be a good moment for us to add the RecipeLinks component to the Data Fetching page with a link for this recipe? I'll let @sarah11918 decide on this!

@sarah11918 sarah11918 added improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. and removed improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) labels May 9, 2023
@sarah11918 sarah11918 added the recipe Best solved by creating a short how-to/example label May 19, 2023
@sarah11918 sarah11918 removed the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Jun 4, 2023
@sarah11918
Copy link
Copy Markdown
Member

Yes! I'm looking at this now @TheOtterlord and wondering whether there might be a good place for this on the Endpoints page too, actually?

Where do you think it would be good to link this from?

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Hi @TheOtterlord! Woo! Helpful recipe here! Sorry I'm just now getting around to reviewing some of the older community contributions, after getting all the launch docs reviewed and ready!

Here are some comments below so that we can whip this one into shape. Have a read through and see what you can come up with! 🙌

Comment thread src/content/docs/en/recipes/call-endpoints.mdx
Comment thread src/content/docs/en/recipes/call-endpoints.mdx Outdated
Comment thread src/content/docs/en/recipes/call-endpoints.mdx Outdated
Comment thread src/content/docs/en/recipes/call-endpoints.mdx Outdated
Comment thread src/content/docs/en/recipes/call-endpoints.mdx Outdated
TheOtterlord and others added 3 commits June 5, 2023 19:31
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
@TheOtterlord
Copy link
Copy Markdown
Member Author

Thanks! Updated the recipe to deal with these issues.

I had a quick look at the endpoints page. The only places I'd think to link to it would be after the overview, or at the bottom of the page. Curious what would be better. I'm leaning to the bottom of the page.

Copy link
Copy Markdown
Member

@ElianCodes ElianCodes left a comment

Choose a reason for hiding this comment

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

The Recipe content itself, looks good to me! But I also believe it should be part of the endpoints page.

The bottom of the page seems best to me. The menu then would look something like this:
Screenshot 2023-06-07 at 15 37 24

@TheOtterlord
Copy link
Copy Markdown
Member Author

Sorry it took so long to get back 😅
Added the recipe link to the bottom

@sarah11918 sarah11918 added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Jul 19, 2023
@sarah11918
Copy link
Copy Markdown
Member

OK, back to this now, and the example looks great @TheOtterlord

I'm going to suggest that on the endpoints page itself, though, that this recipe go much higher. Right now, it looks like it's intended to relate to "redirects" and I think this is a much more straight ahead example than that.

Maybe put it right before the note in the introduction? What do you think about that?

@TheOtterlord
Copy link
Copy Markdown
Member Author

The note in the introduction to server endpoints?

@sarah11918
Copy link
Copy Markdown
Member

Yes, I'm thinking in here, right before the note where it starts talking all about params and stuff:
image

@TheOtterlord
Copy link
Copy Markdown
Member Author

Sounds good. I've moved it up

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

LGTM!

@TheOtterlord TheOtterlord merged commit dd6c16b into withastro:main Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. recipe Best solved by creating a short how-to/example

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No documentation about fetching Astro endpoints on the server

4 participants