I try to use resolutions that are commonly supported, but generally I use the given desktop resolution...
you can use the OS class to determine the mimimum and maximum supported resolutions..
os.get_max_window_size, will return a vector2(x,y)
and
os.get_min_window_size does the same but the minimum resolution
and ofc
os.set_window_size(vector2) will set your resolution
a lot of information can be found here.