Skip to main content

Module serialization

Module serialization 

Source

Functions§

bson_to_json
Convert a BSON value to its JSON equivalent.
document_to_graphql_value
Convert a MongoDB document to a GraphQL-compatible JSON value.
input_doc_to_mongo
Map GraphQL input field names back to MongoDB field names. Relation fields with hex string values are converted to ObjectId. Fields without an explicit graphql_name are returned unchanged. TODO this function look unnecessary, let’s review
json_to_field_value
Convert a serde_json::Value into a dynamic FieldValue for resolver responses.