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

Unclear section on "Getting Started With Graphql" #122

Open
bravely opened this issue Oct 11, 2023 · 3 comments
Open

Unclear section on "Getting Started With Graphql" #122

bravely opened this issue Oct 11, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@bravely
Copy link

bravely commented Oct 11, 2023

On the "Getting Started With Graphql" tutorial page, the "Add AshGraphql to your schema" section(link) includes a lot of instructions that aren't referenced in the code block below.

Excerpt:

Add AshGraphql to your schema

If you don’t have an absinthe schema, you can create one just for ash.
Define a context/1 function, and call AshGraphql.add_context/2 with the current context and your apis. Additionally, add the Absinthe.Middleware.Dataloader to your plugins, as shown below. If you’re starting fresh, just copy the schema below and adjust the module name and api name.

Then, the code block beneath neither contains anything about context, Dataloader, or plugins:

defmodule Helpdesk.Schema do
  use Absinthe.Schema

  @apis [Helpdesk.Support]

  use AshGraphql, apis: @apis

  # The query and mutation blocks is where you can add custom absinthe code
  query do
  end

  mutation do
  end
end

Additional context
If those are automatically created by calling use AshGraphql, apis: @apis then that should probably be spelled out.

@bravely bravely added the documentation Improvements or additions to documentation label Oct 11, 2023
@zachdaniel
Copy link
Collaborator

Ah, right, we've deprecated the need for those now. Would you like to PR the removal of that information? I'm happy to do it if not.

@bravely
Copy link
Author

bravely commented Oct 11, 2023

Sure, I'll see about getting to it when I get the chance. Haven't gotten to properly check out Ash yet!

@juhalehtonen
Copy link

This seems to be fixed :)

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

No branches or pull requests

3 participants