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

Fix create/update timestamp issues in GraphQL and REST #1844

Closed
3 tasks done
etiennedi opened this issue Mar 8, 2022 · 0 comments · Fixed by #1847
Closed
3 tasks done

Fix create/update timestamp issues in GraphQL and REST #1844

etiennedi opened this issue Mar 8, 2022 · 0 comments · Fixed by #1847

Comments

@etiennedi
Copy link
Member

etiennedi commented Mar 8, 2022

Problem 1

When updating an object (using PUT /v1/objects/{id}) we lose creationTimeUnix. It seems to be missing somewhere around here.

Problem 2

Both fields creationTimeUnix and lastUpdateTimeUnix can only be retrieved using the REST API, but aren't accessible through GraphQL

Goals

  • Fix the issue of losing the creation timestamp during an update and prevent regression by adding new test(s)
  • Expose both fields in GraphQL Get as part of _additional { } props alongside vector and id`. E.g. the following query should be possible:
       {
      Get {
        Article {
          text
          _additional {
            vector
            id
            creationTimeUnix
            lastUpdateTimeUnix
          }
        }
      }   
    }
  • If required, adjust documentation

Note

GraphQL (due to its history and relations to Javascript/NodeJS) does not support int64 numbers. Therefore we cannot display a true unix timestamp. The best solution would probably be to convert the timestamp to a string and make the two new fields string types in the GraphQL API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants