Skip to content

Create-operation using JSON provider #4

Description

@hugovanversendaal

Hi,

I'm trying to perform a mutation that creates a new triple and inserts it to a datasource using the JSON provider. Suppose I use the following JSON provider file:

{
    "Mutation": {
        "Fields": [
            {
                "Name": "createPerson",
                "Object": "Person",
                "DataSource": "my-triplestore",
                "IsArray": false
            }
        ]
    },
    "Types": [
        {
            "Name": "Person",
            "Namespace": "http://fake-namespace.com/person",
            "DataSource": "my-triplestore",
            "Fields": [
                {
                    "Name": "firstName",
                    "Scalar": "String"
                },
                {
                    "Name": "lastName",
                    "Scalar": "String"
                }
            ]
        }
    ]
}

What query should I use to add a new person to my triplestore? I've tried to simulate the example from the README, that uses a template argument, but I cannot use that argument by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions