Fix GQL QueryLink

This commit is contained in:
Thomas E Lackey 2024-01-16 17:32:42 -06:00
parent 6f77228f73
commit 1266f29c01

View File

@ -10,8 +10,41 @@ import LinkIcon from '@material-ui/icons/ExitToApp';
import { getServiceUrl } from '../util/config'; import { getServiceUrl } from '../util/config';
const QUERY = ` const QUERY = `
query { fragment ValueParts on Value {
getRecordsByIds(ids: [ "%ID%" ]) { ... on BooleanValue {
bool: value
}
... on IntValue {
int: value
}
... on FloatValue {
float: value
}
... on StringValue {
string: value
}
... on BytesValue {
bytes: value
}
... on LinkValue {
link: value
}
}
fragment AttrParts on Attribute {
key
value {
...ValueParts
... on ArrayValue {
value {
...ValueParts
}
}
}
}
{
getRecordsByIds(ids: ["%ID%"]) {
id id
names names
bondId bondId
@ -19,12 +52,12 @@ const QUERY = `
expiryTime expiryTime
owners owners
attributes { attributes {
key ...AttrParts
value { value {
string ... on MapValue {
json map: value {
reference { ...AttrParts
id }
} }
} }
} }