-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add graphql queries to get oracle data (#532)
Provide a live feed with subscription and query for the latest or by time.
- Loading branch information
Samuel
committed
Aug 24, 2022
1 parent
db6383b
commit b82bc91
Showing
7 changed files
with
111 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
defmodule ArchethicWeb.GraphQLSchema.OracleData do | ||
@moduledoc false | ||
|
||
use Absinthe.Schema.Notation | ||
|
||
@desc """ | ||
[OracleData] represents an oracle data. | ||
""" | ||
object :oracle_data do | ||
field(:services, :oracle_services) | ||
field(:timestamp, :timestamp) | ||
end | ||
|
||
object :oracle_services do | ||
field(:uco, :uco_data) | ||
end | ||
|
||
object :uco_data do | ||
field(:usd, :float) | ||
field(:eur, :float) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters