Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andrea Di Cesare
    @ujibang

    the pattern of the log messages has been always

    <pattern>%d{HH:mm:ss.SSS} [%thread] %highlight(%-5level) %logger{36} - %msg%n %throwable{short}</pattern>

    so without the date

    @hussam-qasem if you want to change it you can specify a custom LogBack configuration following instructions at https://restheart.org/docs/logging/#specify-a-custom-logback-configuration
    John DiMiceli
    @jdimi_gitlab
    Using GraphQL with Restheart. GraphQL types Int, Float, and String all fail to serialize mongodb type BsonInt64. I see support for BsonInt64 was added to Restheart v6.0.0. How do I specify a GraphQL schema type that will solve this? I understand the problem might not be with Restheart, but with GraphQL.
    Andrea Di Cesare
    @ujibang
    John DiMiceli
    @jdimi_gitlab
    Thanks! I will check out Decimal128 as a possible solution
    John DiMiceli
    @jdimi_gitlab
    Decimal128 suffers from the same fate. Returns "Expected type 'Decimal128' but was 'BsonInt64'
    Andrea Di Cesare
    @ujibang
    We need to add a new type. It's quite simple and will add to next release....
    If you add a issue on github it will help!
    Andrea Di Cesare
    @ujibang

    H @jdimi_gitlab I double checked, I think that you can use graphql type Long to map mongodb type BsonInt64

    see https://github.com/SoftInstigate/restheart/blob/master/graphql/src/main/java/org/restheart/graphql/scalars/bsonCoercing/GraphQLBsonInt64Coercing.java

    John DiMiceli
    @jdimi_gitlab
    Absent a creating a custom class copying the techniques of GraphQLBsonInt64Coercing.java, substituting Long for Int in the schema results in this error: "... GraphQLIllegalAppDefinitionException... The Field type 'Long' is not present when resolving type 'MyType'"
    Andrea Di Cesare
    @ujibang
    I pushed 8d6acdb that shouyld fix it . You can try the snapshot build. See how at https://github.com/SoftInstigate/restheart/blob/master/README.md#snapshot-builds
    Andrea Di Cesare
    @ujibang
    Urg build failed, will fix it tomorrow!
    Andrea Di Cesare
    @ujibang

    ok fixed @jdimi_gitlab . you can try 92b51be

    note: you need java 17 to run this snapshot release!

    With the following GraphQL app definition
    {
      "_id": "testLong",
      "descriptor": {
        "name": "TestLong",
        "description": "GraphQL App to test Long scalar",
        "enabled": true,
        "uri": "testLong"
      },
      "schema": "type Test{  _id: ObjectId n: Long  } type Query { all: [Test] }",
      "mappings": {
        "Test": {
        },
        "Query": {
            "all": {
              "db": "restheart",
              "collection": "test"
            }
          }
      }
    }
    creating in the collection test documents like
    {
        "n": {
            "$numberLong": "2398239058230985"
        }
    }

    the following GraphQL request works as expected

    { all { _id n  } }

    reponse

    {
        "data": {
            "all": [
                {
                    "_id": {
                        "$oid": "61b8d1502b29d754e337350c"
                    },
                    "n": 2
                },
                {
                    "_id": {
                        "$oid": "61b8d1512b29d754e337350f"
                    },
                    "n": 2
                },
                {
                    "_id": {
                        "$oid": "61b8d1632b29d754e3373514"
                    },
                    "n": 2
                },
                {
                    "_id": {
                        "$oid": "61b8d16c2b29d754e3373518"
                    },
                    "n": 2398239058230985
                },
                {
                    "_id": {
                        "$oid": "61b9b25bbb8a4542b608c7ea"
                    },
                    "n": 2398239058230985
                }
            ]
        }
    John DiMiceli
    @jdimi_gitlab
    Thanks! Don't know if I'll be able to use your snapshot, but care to predict when the next versioned release will have it?
    Andrea Di Cesare
    @ujibang
    @jdimi_gitlab se will release the fix by next week
    Andrea Di Cesare
    @ujibang
    @jdimi_gitlab we added a more complete description of the GraphQL/Bson types mapping at https://restheart.org/docs/graphql/#bson-types
    the Long-> BsonInt64 mapping will be in 6.1.5 (out very soon)
    Andrea Di Cesare
    @ujibang
    6.1.5 is out!
    Harald Wiesinger
    @s3ppo
    @ujibang i heard about the log2shell security problem for java software.. is this relevant to restheart? ;)
    Andrea Di Cesare
    @ujibang
    No, RESTHeart does not use Log4j
    ๐Ÿพ
    Harald Wiesinger
    @s3ppo
    ๐ŸŽ‰๐Ÿฅณ๐Ÿฅณ
    Andrea Di Cesare
    @ujibang
    @jdimi_gitlab we found a bug in 6.1.5, going to release 6.1.6 soon. Please update!
    Maurizio Turatti
    @mkjsix
    Maurizio Turatti
    @mkjsix
    henczi-espirit
    @henczi-espirit

    Hello all. I am Nico from e-Spirit and I have a question:
    I wanted to know which query parameters do NOT have the form ?key=value (so for example ?count or ?np). For this I tried to find in the documentation some kind of list of all possible query parameters. Unfortunately I had no success with it. Is there such a list?

    Additionally, I noticed that ?count and ?np no longer exist in the current v6 documentation. I haven't looked through all the release notes yet, but I guess this means that these parameters are deprecated?

    Thanks in advance.
    I hope you had a good start into the new year.

    Ghost
    @ghost~61d5c9a96da03739848db0c8

    Hello everyone,

    I have a simple question, but cannot figure a way out to work. I would like to use RESTHeart with docker and connect to a remote database. However, I donโ€™t really know how to do so.

    In the default.properties file I change the mongo-uri and root-mongo-resource. I tried to connect to a local database running on localhost and to a hosted database on DigitalOcean, neither works. Do I have to change anything else?

    Maurizio Turatti
    @mkjsix
    if you look at the docs at https://hub.docker.com/r/softinstigate/restheart
    3) Run a RESTHeart container
    
    docker run -d --rm --network restheart-network -p "8080:8080" -e MONGO_URI="mongodb://mongodb" softinstigate/restheart
    2 replies
    so you need to pass the MONGO_URI
    if you are running with docker-compose you just need to edit the MONGO_URI environment variable in the docker-compose.yml (https://raw.githubusercontent.com/SoftInstigate/restheart/master/docker-compose.yml)
    11 replies
    Alternatively you need to run the docker container mounting a docker volume overriding the restheart.propeties file, the local one is immutable
    Maurizio Turatti
    @mkjsix
    @tolbri if you have issues with this let us know
    Andrea Di Cesare
    @ujibang
    image.png

    hi @henczi-espirit , the query parameters that don't require a value (although you can actually set one as in ?checkEtag equals to ?checkEtag=whatever) are: ?checkEtag, ?count and ?np

    Note that HAL representation is deprecated (in favour of standard representation, see https://restheart.org/docs/representation-format/#other-representation-formats).

    1 reply
    HAL and SHAL are deprecated in version 6.0 and will likely be removed in a future release.
    Andrea Di Cesare
    @ujibang

    hi @tolbri , we have updated the documentation. http://127.0.0.1:4000/docs/setup/#run-with-docker

    If you want to run RESTHeart with docker and have MongoDB running on localhost you can just run the following command

    $ docker run -it --rm -p "8080:8080" -e MONGO_URI='mongodb://host.docker.internal' softinstigate/restheart
    Harald Wiesinger
    @s3ppo
    @ujibang after last docker pull my container dont come up.. are there any breaking changes to last version?
    i got:
    09:54:16.741 [main] ERROR org.restheart.Bootstrapper - Unmatched argument at index 1: '/rh/etc/restheart.yml' Usage: java -Dfile.encoding=UTF-8 -jar -server restheart.jar [-hv] [--fork]
    Andrea Di Cesare
    @ujibang
    Hi @s3ppo yes we changed the Dockerfile of the native image to align with the structure of the other images
    This means that the configuration file should be mounted under /opt/restheart/etc/restheart.yml (before was /rh/etc/restheart.yml)
    and the corresponing new docker-compose-native.yml at https://github.com/SoftInstigate/restheart/blob/master/docker-compose.yml
    Andrea Di Cesare
    @ujibang
    you also don't need to pass the argument /rh/etc/restheart.yml, it points to /opt/restheart/etc/restheart.yml by default
    Harald Wiesinger
    @s3ppo
    @ujibang thank you, its up again :-)