Add spec for query, graph and trigger