Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: generate recursive pull patterns for specs #4

Open
devth opened this issue Jan 20, 2017 · 0 comments
Open

feature request: generate recursive pull patterns for specs #4

devth opened this issue Jan 20, 2017 · 0 comments

Comments

@devth
Copy link

devth commented Jan 20, 2017

e.g. given specs:

{:interface.def/name :interface.person
 :interface.def/fields
 #:person{:person.id/uuid [:uuid "A uuid to identify the person" :db.unique/identity :required]
          :name [[:interface.person/name] "A person's names" :gen/should-generate]}
 :interface.def/identify-via [['?e :person.id/uuid]]}

{:interface.def/name :interface.person/name
 :interface.def/fields
 #:person.name{:first [:string "First name" :gen/should-generate]
               :last [:string "Last name" :gen/should-generate]}
 :interface.def/identify-via [(or ['?e :person.name/first]
                                  ['?e :person.name/last])]}

A call to generate the pull would look like:

(gen-pull ast :interface.person)

;; result 👇

[:person.id/uuid
 {:person/name [:person.name/first
                :person.name/last]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant