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

@directives modeling #2

Open
blochaou opened this issue Mar 12, 2019 · 5 comments
Open

@directives modeling #2

blochaou opened this issue Mar 12, 2019 · 5 comments

Comments

@blochaou
Copy link

Hi

I try to model @unique directive with this extension. I try to use tags as in the documentation but any directive is generated.

i designed:

id: ID[1] {unique}

I expected:
`
type Client {

id: ID! @unique
police: String
nom: String
prenom: String

}
I got:
type Client {

id: ID!
police: String
nom: String
prenom: String

}
`

Please any help.

@orefalo
Copy link
Owner

orefalo commented Mar 12, 2019

You need to use Tags or Constraints for directives

Tags are visible
Constraints are not

If I recall ;-)

@blochaou
Copy link
Author

Hi
Thank you for your answer. I know i have to use Tags and Contraints but i don't see anywhere to define tags and contraints in StarUml as i'm new in this software.
Thank

@blochaou
Copy link
Author

Sorry
I see tags and Constraints.
It generate @unique() instead @unique
Do you have any idea ?
Thank you very much.

@blochaou
Copy link
Author

blochaou commented Mar 12, 2019

Hi
In the source code i see
`
// graphql visual directives - modeled as Tags

  const _tags = elem.tags;
  if (_tags) {
    for (i = 0, len = _tags.length; i < len; i++) {
      e = _tags[i];
      terms.push(" @" + e.name + "(" + e.value + ")");
    }
  }

`
It seems that there is no way to remove parenthesis from the StarUML GUI.
Please confirm if i'm right. I can modify by myself

Regards

@orefalo
Copy link
Owner

orefalo commented Mar 13, 2019

that's right, I forgot about contraints without parameters.
if you could do the change, I will gladly merge it in.

Thank you

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

2 participants