Open Pafaul opened 5 months ago
Also it's possible to extract the failing query from Postgres logs and re-run it in pgAdmin successfully after pasting all parameters in the query with slight modification of the parameters: modified integer values so they will become int4range
and specifying bytea[]
in prepare
statement of the failing query this way:
/* controller='filter',application='sgd6',route='b0561059edd8d80b-6dc8c4ef99f8cc6a',action='810697' */
prepare dbgq5 (bytea[], bytea[], bytea[], unknown, unknown, bytea[], bytea[], unknown, unknown, bytea[], bytea[], unknown, unknown, bytea[], bytea[], unknown, unknown, bytea[], bytea[], unknown, unknown, bytea[], bytea[], unknown, unknown) as
with matches as (select c.* from unnest($1) as q(id)
cross join lateral (select 'MajorityVotingConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($2), unnest($3)) as p(id, child_id), "sgd6"."majority_voting_config" c where c.block_range @> $4 and q.id = p.id and c.id = any($5) and c.id = p.child_id
union all
select 'MultiprocessConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($6), unnest($7)) as p(id, child_id), "sgd6"."multiprocess_config" c where c.block_range @> $8 and q.id = p.id and c.id = any($9) and c.id = p.child_id
union all
select 'NominationConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($10), unnest($11)) as p(id, child_id), "sgd6"."nomination_config" c where c.block_range @> $12 and q.id = p.id and c.id = any($13) and c.id = p.child_id
union all
select 'SignatureCollectionConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($14), unnest($15)) as p(id, child_id), "sgd6"."signature_collection_config" c where c.block_range @> $16 and q.id = p.id and c.id = any($17) and c.id = p.child_id
union all
select 'PetitionCreationConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($18), unnest($19)) as p(id, child_id), "sgd6"."petition_creation_config" c where c.block_range @> $20 and q.id = p.id and c.id = any($21) and c.id = p.child_id
union all
select 'ElectionActionConfig' as entity, c.id, c.vid, p.id::text as g$parent_id
/* child_type_d */ from rows from (unnest($22), unnest($23)) as p(id, child_id), "sgd6"."election_action_config" c where c.block_range @> $24 and q.id = p.id and c.id = any($25) and c.id = p.child_id
limit 100) c)
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."majority_voting_config" c, matches m
where c.vid = m.vid and m.entity = 'MajorityVotingConfig'
union all
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."multiprocess_config" c, matches m
where c.vid = m.vid and m.entity = 'MultiprocessConfig'
union all
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."nomination_config" c, matches m
where c.vid = m.vid and m.entity = 'NominationConfig'
union all
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."signature_collection_config" c, matches m
where c.vid = m.vid and m.entity = 'SignatureCollectionConfig'
union all
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."petition_creation_config" c, matches m
where c.vid = m.vid and m.entity = 'PetitionCreationConfig'
union all
select m.*, to_jsonb("c".*)|| jsonb_build_object('g$parent_id', m.g$parent_id) as data
from "sgd6"."election_action_config" c, matches m
where c.vid = m.vid and m.entity = 'ElectionActionConfig';
-- binds: [[], [], [], 810697, [], [], [], 810697, [], [], [], 810697, [], [], [], 810697, [], [], [], 810697, [], [], [], 810697, []]"
execute dbgq5(
ARRAY [ '\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2','\xf5afa348ba67b91955eafa42662ab58ec842e2bd', '\xa8f5445e673f43ff98498fa0573d016fd86da1d7', '\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d','\xbbf7930aa4e7cf085e324868bb73803505637676','\x7a11971f315dcd727b9a198234ce96975f98651d','\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d','\xf95846c951f621934b7b25ed47362669d6477935','\x9f060b2b46704faf4416c45cc51ed5ccca37a939' ] :: bytea[],
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
'{"\\x2ee8cc48ac78f7bad672f4b7e990719da9542b2d","\\x3804f13e9ffe20e4a4ec2a3c8ea86f554e3014c2","\\x7a11971f315dcd727b9a198234ce96975f98651d","\\x9f060b2b46704faf4416c45cc51ed5ccca37a939","\\xa8f5445e673f43ff98498fa0573d016fd86da1d7","\\xbbf7930aa4e7cf085e324868bb73803505637676","\\xc16da5cfc38df73da0eb79fd66994cdb7a0cd86d","\\xf5afa348ba67b91955eafa42662ab58ec842e2bd","\\xf95846c951f621934b7b25ed47362669d6477935"}',
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}',
int4range(810697, 810697+1),
'{"\\x09a77b435413ab147a144c0998e5eea6c641c465836d423a4df58b07e0f68216","\\x0cb15ed95d125dc102fa7c021b5b46fc31d3ab91b3843ead48836c4a2961764e","\\x2cca552cce8c885b1aad68e12bddaf28aa585327e4672be237519b65aa95ce4f","\\x546964ee9a35b06ec5326e397f423b8099c5d241e5b9de4db1c4806024f10f67","\\x8e5413fabeb731a083f933277538afe77f0f60785f4a23316d80910639fe5980","\\x66ce9ff117a74b17d65c0bce4da9f4eeb28e85f73b3710936afbefe1b15e3160","\\xdf7f73874e493a96cb23e8c1fd7b433451d3a2dbb1f3ac5beca81d45e38f7279","\\x716f01cb934853e494c2a0611e015444cb08682da85d9f5a2e794fdebd8ef8c1","\\xf6b4bda4d82f7fa5b0ac23a4e9f5a4f0ad5a4f3f2c1666ec1bad8d3f803f3d21"}'
)
Bug report
Current graphql schema looks like this
with this kind of structure I've tried three queries
First query return correct data, but the last two result in error, bubbling up from Postgres.
It does not error when
ProcessSpawner.staticConfig
isBytes
instead of interface reference, but it defeats the point of using interfaces.Do you have any ideas why it can be occurring?
From what I've tried already:
id
fromBytes
toID
and backv0.35.0
tov0.34.1
@graphprotocol/graph-cli
to0.73.0
,0.35.1
)Tested environments
Local setup:
v0.35.0
andv0.34.1
Remote setup:
v0.35.0
Relevant log output
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
Other (please specify in your bug report)