Skip to content

Commit

Permalink
Merge pull request #35 from dasaep/master
Browse files Browse the repository at this point in the history
Renamed JSONString to ElasticJSONString and changed references in rel…
  • Loading branch information
barseghyanartur committed Jul 7, 2020
2 parents 27ed065 + 386af2f commit b2db4e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/graphene_elastic/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def convert_field_to_datetime(field, registry=None):
@convert_elasticsearch_field.register(elasticsearch_fields.Object)
@convert_elasticsearch_field.register(elasticsearch_fields.Nested)
def convert_field_to_jsonstring(field, registry=None):
from .types import JSONString
from .types import ElasticJSONString

return JSONString(
return ElasticJSONString(
description=get_field_description(field, registry),
required=field._required,
)
4 changes: 2 additions & 2 deletions src/graphene_elastic/filter_backends/highlight/common.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from copy import deepcopy
import enum
import graphene
from graphene_elastic.types.json_string import JSONString
from graphene_elastic.types.json_string import ElasticJSONString
from stringcase import pascalcase as to_pascal_case

from ...constants import DYNAMIC_CLASS_NAME_PREFIX
Expand Down Expand Up @@ -29,7 +29,7 @@ def highlight_resolver(parent, args, context=None, info=None):
return parent.meta._d_.get('highlight')


class HighlightField(JSONString):
class HighlightField(ElasticJSONString):
"""Highlight field."""


Expand Down
4 changes: 2 additions & 2 deletions src/graphene_elastic/relay/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class EdgeMeta:
edge = type(edge_name, edge_bases, {"Meta": EdgeMeta})
cls.Edge = edge

from graphene_elastic.types.json_string import JSONString
from graphene_elastic.types.json_string import ElasticJSONString

options["name"] = name
_meta.node = node
Expand All @@ -148,7 +148,7 @@ class EdgeMeta:
(
"facets",
Field(
JSONString,
ElasticJSONString,
name="facets",
required=False,
description="Pagination data for this connection.",
Expand Down
4 changes: 2 additions & 2 deletions src/graphene_elastic/types/json_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
__copyright__ = '2019-2020 Artur Barseghyan'
__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later'
__all__ = (
'JSONString',
'ElasticJSONString',
'to_serializable',
)

Expand All @@ -29,7 +29,7 @@ def to_serializable(o):
return o


class JSONString(OriginalJSONString):
class ElasticJSONString(OriginalJSONString):
@staticmethod
def serialize(dt):
# return to_serializable(dt)
Expand Down

0 comments on commit b2db4e8

Please sign in to comment.