Comments (3)
@ekampf created PR #37 for this
from graphene-gae.
@syrusakbary so far the above is working for me. Might be nice to add it in since it's an NDB supported property. Or I could open a PR with the one line change?
from graphene-gae.
Just listing what ended up doing
diff --git a/api/lib/graphene_gae/ndb/converter.py b/api/lib/graphene_gae/ndb/converter.py
index 2450cd7..d580c06 100644
--- a/api/lib/graphene_gae/ndb/converter.py
+++ b/api/lib/graphene_gae/ndb/converter.py
@@ -6,7 +6,7 @@ from google.appengine.ext import ndb
from graphene import String, Boolean, Int, Float, List, NonNull, Field, Dynamic
from graphene.types.json import JSONString
-from graphene.types.datetime import DateTime
+from graphene.types.datetime import DateTime, Time
from .fields import DynamicNdbKeyStringField, DynamicNdbKeyReferenceField
@@ -60,6 +60,10 @@ def convert_ndb_datetime_property(ndb_prop):
return Field(DateTime, description=ndb_prop._name)
+def convert_ndb_time_property(ndb_prop):
+ return Field(Time, description=ndb_prop._name)
+
+
def convert_ndb_key_propety(ndb_key_prop):
"""
Two conventions for handling KeyProperties:
@@ -135,6 +139,7 @@ converters = {
ndb.FloatProperty: convert_ndb_float_property,
ndb.JsonProperty: convert_ndb_json_property,
ndb.DateProperty: convert_ndb_datetime_property,
+ ndb.TimeProperty: convert_ndb_time_property,
ndb.DateTimeProperty: convert_ndb_datetime_property,
ndb.KeyProperty: convert_ndb_key_propety,
ndb.StructuredProperty: convert_local_structured_property,
from graphene-gae.
Related Issues (18)
- GraphiQL Integration for Webapp2 HOT 7
- Docs page does not exist HOT 3
- KeyProperty not showing up in schema HOT 2
- Passing query as JSON (for variables, etc.) seems broken HOT 8
- Version bump? HOT 2
- PolyModel HOT 2
- Expected value of type "UserType" but got: User HOT 3
- app.yaml handlers? HOT 1
- GraphQL Integration for Cloud Endpoints
- How do you filter? HOT 1
- NDBConnectionField
- Is it possible to use google-cloud-ndb with this package?
- ndb.GeoPtProperty support
- Looking for maintainers! HOT 4
- Support AppEngine Flexible Environment (gcloud library in addition to ndb)
- ndb.ComputedFields support
- Support ndb.LocalStructuredProperty (and their Repeated version)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene-gae.