Current section
15 Versions
Jump to
Current section
15 Versions
Compare versions
3
files changed
+6
additions
-5
deletions
| @@ -42,4 +42,4 @@ | |
| 42 42 | {<<"optional">>,false}, |
| 43 43 | {<<"repository">>,<<"hexpm">>}, |
| 44 44 | {<<"requirement">>,<<"~> 1.6">>}]]}. |
| 45 | - {<<"version">>,<<"0.1.2">>}. |
| 45 | + {<<"version">>,<<"0.1.3">>}. |
| @@ -29,12 +29,13 @@ defmodule AbsintheExtra.Case.QueryBuilder do | |
| 29 29 | Builds a Graphql query string. |
| 30 30 | """ |
| 31 31 | @spec graphql_node_query( |
| 32 | - query_id :: String.t(), |
| 33 32 | query_type :: atom, |
| 33 | + query_id :: String.t(), |
| 34 34 | query_fields :: keyword |
| 35 35 | ) :: String.t() |
| 36 | - def graphql_node_query(id, type, fields) do |
| 37 | - arg_str = build_args(id: id) |
| 36 | + def graphql_node_query(type, id, fields, opts \\ []) do |
| 37 | + global_id = Absinthe.Relay.Node.to_global_id(type, id, fetch_schema(opts)) |
| 38 | + arg_str = build_args(id: global_id) |
| 38 39 | field_str = prepare_fields(_on: [{type, fields}]) |
| 39 40 | |
| 40 41 | "{node#{arg_str}#{field_str}}" |
| @@ -4,7 +4,7 @@ defmodule AbsintheExtra.MixProject do | |
| 4 4 | def project do |
| 5 5 | [ |
| 6 6 | app: :absinthe_extra, |
| 7 | - version: "0.1.2", |
| 7 | + version: "0.1.3", |
| 8 8 | deps: deps(), |
| 9 9 | docs: [main: "readme", extras: ["README.md"]], |
| 10 10 | description: description(), |