imperfect-fourth / eywa

A flexible ORM-style GraphQL client
7 stars 0 forks source link

add unsafe actions #16

Open imperfect-fourth opened 2 months ago

imperfect-fourth commented 2 months ago

Example:

type testAction struct {
    Name string `json:"name"`
    ID   *int   `json:"id,omitempty"`
}

func (a testAction) ModelName() string {
    return "test_action"
}

...

q := Action[testAction]().QueryArgs(
    map[string]interface{}{
        "arg1": 4,
        "arg2": "value",
        "arg3": eywa.HasuraEnum("enumvalue"),
    },
).Select("name").Exec(client)