Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not forget to register DocumentIdScalar #252

Merged
merged 2 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Filter out deleted documents in `get_documents_by_schema` SQL query [#193](https://github.com/p2panda/aquadoggo/pull/193)
- Resolve implicit `__typename` field on dynamically generated GraphQL objects [#236](https://github.com/p2panda/aquadoggo/pull/236)
- Allow `Content-Type` header [#236](https://github.com/p2panda/aquadoggo/pull/236)
- Do not forget to register `DocumentIdScalar` [#252](https://github.com/p2panda/aquadoggo/pull/252)

## [0.3.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl DocumentMeta {
);

// Manually register scalar type in registry because it's not used in the static api.
DocumentViewIdScalar::create_type_info(registry);
DocumentIdScalar::create_type_info(registry);

fields.insert(
VIEW_ID_FIELD.to_string(),
Expand Down
8 changes: 0 additions & 8 deletions aquadoggo/src/graphql/client/static_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ impl StaticQuery {
can be left empty when it is a CREATE operation"
)]
document_view_id: Option<scalars::DocumentViewIdScalar>,
// @TODO: Figure out why this fixes things....
// Related issue: https://github.com/p2panda/aquadoggo/issues/242
#[graphql(
name = "documentId",
desc = "Document the entry's UPDATE or DELETE operation is referring to, \
can be left empty when it is a CREATE operation"
)]
_document_id: Option<scalars::DocumentIdScalar>,
) -> Result<NextArguments> {
// Access the store from context.
let store = ctx.data::<SqlStorage>()?;
Expand Down