mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 05:13:33 +12:00
chore: Wording tweaks to installer content (#193)
This commit is contained in:
parent
88735868cc
commit
4f0d508a3e
1 changed files with 12 additions and 9 deletions
|
@ -34,10 +34,10 @@ defmodule Mix.Tasks.AshGraphql.Install do
|
||||||
{igniter, nil} ->
|
{igniter, nil} ->
|
||||||
igniter
|
igniter
|
||||||
|> Igniter.add_warning("""
|
|> Igniter.add_warning("""
|
||||||
No Phoenix router found, skipping phoenix installation.
|
No Phoenix router found, skipping Phoenix installation.
|
||||||
|
|
||||||
See the getting started guide for instructions on installing AshGraphql with `plug`.
|
See the Getting Started guide for instructions on installing AshGraphql with `plug`.
|
||||||
If you have yet to set up phoenix, you'll have to do that manually and then rerun this installer.
|
If you have yet to set up Phoenix, you'll have to do that manually and then rerun this installer.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
{igniter, router} ->
|
{igniter, router} ->
|
||||||
|
@ -113,14 +113,17 @@ defmodule Mix.Tasks.AshGraphql.Install do
|
||||||
|
|
||||||
placeholder_query =
|
placeholder_query =
|
||||||
unless any_queries? do
|
unless any_queries? do
|
||||||
|
~S'''
|
||||||
|
@desc """
|
||||||
|
Hello! This is a sample query to verify that AshGraphql has been set up correctly.
|
||||||
|
Remove me once you have a query of your own!
|
||||||
"""
|
"""
|
||||||
@desc "Remove me once you have a query of your own!"
|
field :say_hello, :string do
|
||||||
field :remove_me, :string do
|
|
||||||
resolve fn _, _, _ ->
|
resolve fn _, _, _ ->
|
||||||
{:ok, "Remove me!"}
|
{:ok, "Hello from AshGraphql!"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"""
|
'''
|
||||||
end
|
end
|
||||||
|
|
||||||
igniter
|
igniter
|
||||||
|
@ -131,12 +134,12 @@ defmodule Mix.Tasks.AshGraphql.Install do
|
||||||
use AshGraphql, domains: #{inspect(domains)}
|
use AshGraphql, domains: #{inspect(domains)}
|
||||||
|
|
||||||
query do
|
query do
|
||||||
# Custom absinthe queries can be placed here
|
# Custom Absinthe queries can be placed here
|
||||||
#{placeholder_query}
|
#{placeholder_query}
|
||||||
end
|
end
|
||||||
|
|
||||||
mutation do
|
mutation do
|
||||||
# Custom absinthe mutations can be placed here
|
# Custom Absinthe mutations can be placed here
|
||||||
end
|
end
|
||||||
""",
|
""",
|
||||||
fn zipper ->
|
fn zipper ->
|
||||||
|
|
Loading…
Reference in a new issue